protected function preparePermissions(array &$prepared, array $permissions)
    {
        foreach ($permissions as $keys => $value) {
            foreach ($this->extractClassPermissions($keys) as $key) {
                // If the value is not in the array, we're opting in
                if (! array_key_exists($key, $prepared)) {
                    $prepared[$key] = $value;

                    continue;
                }

                // If our value is in the array and equals false, it will override
                if ($value === false) {
                    $prepared[$key] = $value;
                }
            }
        }
    }
protected function preparePermissions(array &$prepared, array $permissions)
    {
        foreach ($permissions as $keys => $value) {
            foreach ($this->extractClassPermissions($keys) as $key) {
                // If the value is not in the array, we're opting in
                if (! array_key_exists($key, $prepared)) {
                    $prepared[$key] = $value;

                    continue;
                }

                // If our value is in the array and equals false, it will override
                if ($value === false) {
                    $prepared[$key] = $value;
                }
            }
        }
    }
protected function preparePermissions ( array & $ prepared , array $ permissions ) { foreach ( $ permissions as $ keys => $ value ) { foreach ( $ this -> extractClassPermissions ( $ keys ) as $ key ) { // If the value is not in the array, we're opting in if ( ! array_key_exists ( $ key , $ prepared ) ) { $ prepared [ $ key ] = $ value ; continue ; } // If our value is in the array and equals false, it will override if ( $ value === false ) { $ prepared [ $ key ] = $ value ; } } } }
Does the heavy lifting of preparing permissions.

@param  array  $prepared
@param  array  $permissions
@return void
Does the heavy lifting of preparing permissions .