private function createPackages(array $packages)
    {
        $matcherPackages = [];

        foreach ($packages as $package) {
            $reflection = new ReflectionClass($package);

            if ($reflection->implementsInterface(self::PACKAGE_REGISTRAR) === false) {
                throw NotAvailableException::createForPackage(self::PACKAGE_REGISTRAR);
            }
            $matcherPackages[] = $reflection->newInstance();
        }

        return $matcherPackages;
    }
private function createPackages(array $packages)
    {
        $matcherPackages = [];

        foreach ($packages as $package) {
            $reflection = new ReflectionClass($package);

            if ($reflection->implementsInterface(self::PACKAGE_REGISTRAR) === false) {
                throw NotAvailableException::createForPackage(self::PACKAGE_REGISTRAR);
            }
            $matcherPackages[] = $reflection->newInstance();
        }

        return $matcherPackages;
    }
private function createPackages ( array $ packages ) { $ matcherPackages = [ ] ; foreach ( $ packages as $ package ) { $ reflection = new ReflectionClass ( $ package ) ; if ( $ reflection -> implementsInterface ( self :: PACKAGE_REGISTRAR ) === false ) { throw NotAvailableException :: createForPackage ( self :: PACKAGE_REGISTRAR ) ; } $ matcherPackages [ ] = $ reflection -> newInstance ( ) ; } return $ matcherPackages ; }
Create a few new package registrars

@param array $packages

@return \expect\PackageRegistrar[]
Create a few new package registrars