src/Package/Finder.php
private function loadPackage(NamespaceInterface $namespace, PackageInterface $parent = null): Generator
    {
        $package = new Package($namespace, $parent);
        yield $package;

        // Packages can have a single tier of sub-packages. If we don't have a parent, search our namespace for any
        //  children we might have. If we have a parent, they caused enough psychological damage that we don't want kids.
        if (!$parent) {
            yield from $this->findSubPackages($package);
        }
    }
private function loadPackage(NamespaceInterface $namespace, PackageInterface $parent = null): Generator
    {
        $package = new Package($namespace, $parent);
        yield $package;

        // Packages can have a single tier of sub-packages. If we don't have a parent, search our namespace for any
        //  children we might have. If we have a parent, they caused enough psychological damage that we don't want kids.
        if (!$parent) {
            yield from $this->findSubPackages($package);
        }
    }
private function loadPackage ( NamespaceInterface $ namespace , PackageInterface $ parent = null ) : Generator { $ package = new Package ( $ namespace , $ parent ) ; yield $ package ; // Packages can have a single tier of sub-packages. If we don't have a parent, search our namespace for any //  children we might have. If we have a parent, they caused enough psychological damage that we don't want kids. if ( ! $ parent ) { yield from $ this -> findSubPackages ( $ package ) ; } }
Loads a package from a namespace.

@param NamespaceInterface    $namespace The namespace to load the package with.
@param PackageInterface|null $parent    This package's parent, implying it is a sub-package. Null if none.

@return Generator|PackageInterface[]
Loads a package from a namespace .