src/Package/Finder.php
private function findSubPackages(PackageInterface $package): Generator
    {
        $readMes = new \Symfony\Component\Finder\Finder();
        $readMes->files()
                ->in($package->getPaths())
                ->depth(1)
                ->name('readme.md');

        // If no sub-folders have a readme, there aren't any sub-packages here.
        if (!$readMes->count()) {
            return;
        }
        yield from $this->scanNamespaceForPackages($package, $package);
    }
private function findSubPackages(PackageInterface $package): Generator
    {
        $readMes = new \Symfony\Component\Finder\Finder();
        $readMes->files()
                ->in($package->getPaths())
                ->depth(1)
                ->name('readme.md');

        // If no sub-folders have a readme, there aren't any sub-packages here.
        if (!$readMes->count()) {
            return;
        }
        yield from $this->scanNamespaceForPackages($package, $package);
    }
private function findSubPackages ( PackageInterface $ package ) : Generator { $ readMes = new \ Symfony \ Component \ Finder \ Finder ( ) ; $ readMes -> files ( ) -> in ( $ package -> getPaths ( ) ) -> depth ( 1 ) -> name ( 'readme.md' ) ; // If no sub-folders have a readme, there aren't any sub-packages here. if ( ! $ readMes -> count ( ) ) { return ; } yield from $ this -> scanNamespaceForPackages ( $ package , $ package ) ; }
Finds all sub-packages in a package.

@param PackageInterface $package The package to search.

@return Generator|PackageInterface[]
Finds all sub - packages in a package .