protected function normalizeOptions(array $options): array
    {
        $options = array_replace($this->getDefaultOptions(), $options);

        $options['cacheDir'] = PathResolver::realpath($options['cacheDir']);

        if (!$options['cacheDir']) {
            throw new \RuntimeException('You need to provide valid cache directory for Go! AOP framework.');
        }

        $options['excludePaths'][] = $options['cacheDir'];
        $options['excludePaths'][] = __DIR__ . '/../';
        $options['appDir']         = PathResolver::realpath($options['appDir']);
        $options['cacheFileMode']  = (int) $options['cacheFileMode'];
        $options['includePaths']   = PathResolver::realpath($options['includePaths']);
        $options['excludePaths']   = PathResolver::realpath($options['excludePaths']);

        return $options;
    }
protected function normalizeOptions(array $options): array
    {
        $options = array_replace($this->getDefaultOptions(), $options);

        $options['cacheDir'] = PathResolver::realpath($options['cacheDir']);

        if (!$options['cacheDir']) {
            throw new \RuntimeException('You need to provide valid cache directory for Go! AOP framework.');
        }

        $options['excludePaths'][] = $options['cacheDir'];
        $options['excludePaths'][] = __DIR__ . '/../';
        $options['appDir']         = PathResolver::realpath($options['appDir']);
        $options['cacheFileMode']  = (int) $options['cacheFileMode'];
        $options['includePaths']   = PathResolver::realpath($options['includePaths']);
        $options['excludePaths']   = PathResolver::realpath($options['excludePaths']);

        return $options;
    }
protected function normalizeOptions ( array $ options ) : array { $ options = array_replace ( $ this -> getDefaultOptions ( ) , $ options ) ; $ options [ 'cacheDir' ] = PathResolver :: realpath ( $ options [ 'cacheDir' ] ) ; if ( ! $ options [ 'cacheDir' ] ) { throw new \ RuntimeException ( 'You need to provide valid cache directory for Go! AOP framework.' ) ; } $ options [ 'excludePaths' ] [ ] = $ options [ 'cacheDir' ] ; $ options [ 'excludePaths' ] [ ] = __DIR__ . '/../' ; $ options [ 'appDir' ] = PathResolver :: realpath ( $ options [ 'appDir' ] ) ; $ options [ 'cacheFileMode' ] = ( int ) $ options [ 'cacheFileMode' ] ; $ options [ 'includePaths' ] = PathResolver :: realpath ( $ options [ 'includePaths' ] ) ; $ options [ 'excludePaths' ] = PathResolver :: realpath ( $ options [ 'excludePaths' ] ) ; return $ options ; }
Normalizes options for the kernel

@param array $options List of options
Normalizes options for the kernel