src/Container.php
private function serviceExtensionMap(array $providers): array
    {
        $wrap = function ($factory) { return [$factory]; };

        return array_reduce($providers, function ($extensions, ServiceProviderInterface $provider) use ($wrap) {

            return array_merge_recursive($extensions, array_map($wrap, $provider->getExtensions()));

        }, []);
    }
private function serviceExtensionMap(array $providers): array
    {
        $wrap = function ($factory) { return [$factory]; };

        return array_reduce($providers, function ($extensions, ServiceProviderInterface $provider) use ($wrap) {

            return array_merge_recursive($extensions, array_map($wrap, $provider->getExtensions()));

        }, []);
    }
private function serviceExtensionMap ( array $ providers ) : array { $ wrap = function ( $ factory ) { return [ $ factory ] ; } ; return array_reduce ( $ providers , function ( $ extensions , ServiceProviderInterface $ provider ) use ( $ wrap ) { return array_merge_recursive ( $ extensions , array_map ( $ wrap , $ provider -> getExtensions ( ) ) ) ; } , [ ] ) ; }
Return a service extension map from the given service providers.

@param array $providers
@return array
Return a service extension map from the given service providers .