protected function mapDirectories(array $directories): array
    {
        if (!isset($directories['root'])) {
            throw new BootException("Missing required directory `root`.");
        }

        if (!isset($directories['app'])) {
            $directories['app'] = $directories['root'] . '/app/';
        }

        return array_merge([
            // public root
            'public'    => $directories['root'] . '/public/',

            // vendor libraries
            'vendor'    => $directories['root'] . '/vendor/',

            // data directories
            'runtime'   => $directories['root'] . '/runtime/',
            'cache'     => $directories['root'] . '/runtime/cache/',

            // application directories
            'config'    => $directories['app'] . '/config/',
            'resources' => $directories['app'] . '/resources/',
        ], $directories);
    }
protected function mapDirectories(array $directories): array
    {
        if (!isset($directories['root'])) {
            throw new BootException("Missing required directory `root`.");
        }

        if (!isset($directories['app'])) {
            $directories['app'] = $directories['root'] . '/app/';
        }

        return array_merge([
            // public root
            'public'    => $directories['root'] . '/public/',

            // vendor libraries
            'vendor'    => $directories['root'] . '/vendor/',

            // data directories
            'runtime'   => $directories['root'] . '/runtime/',
            'cache'     => $directories['root'] . '/runtime/cache/',

            // application directories
            'config'    => $directories['app'] . '/config/',
            'resources' => $directories['app'] . '/resources/',
        ], $directories);
    }
protected function mapDirectories ( array $ directories ) : array { if ( ! isset ( $ directories [ 'root' ] ) ) { throw new BootException ( "Missing required directory `root`." ) ; } if ( ! isset ( $ directories [ 'app' ] ) ) { $ directories [ 'app' ] = $ directories [ 'root' ] . '/app/' ; } return array_merge ( [ // public root 'public' => $ directories [ 'root' ] . '/public/' , // vendor libraries 'vendor' => $ directories [ 'root' ] . '/vendor/' , // data directories 'runtime' => $ directories [ 'root' ] . '/runtime/' , 'cache' => $ directories [ 'root' ] . '/runtime/cache/' , // application directories 'config' => $ directories [ 'app' ] . '/config/' , 'resources' => $ directories [ 'app' ] . '/resources/' , ] , $ directories ) ; }
Normalizes directory list and adds all required aliases.

@param array $directories
@return array
Normalizes directory list and adds all required aliases .