src/PatchCollector.php
protected function collectSubpackagePatches(array $subPackages, $allowedSubpatches)
    {
        $collectedPatches = new PatchCollection();
        if ($allowedSubpatches !== false && $allowedSubpatches !== array()) {
            foreach ($subPackages as $subPackage) {
                if ($allowedSubpatches === true || in_array($subPackage->getName(), $allowedSubpatches, true)) {
                    $collectedPatches->merge($this->collectPatchesFromPackage($subPackage));
                }
            }
        }

        return $collectedPatches;
    }
protected function collectSubpackagePatches(array $subPackages, $allowedSubpatches)
    {
        $collectedPatches = new PatchCollection();
        if ($allowedSubpatches !== false && $allowedSubpatches !== array()) {
            foreach ($subPackages as $subPackage) {
                if ($allowedSubpatches === true || in_array($subPackage->getName(), $allowedSubpatches, true)) {
                    $collectedPatches->merge($this->collectPatchesFromPackage($subPackage));
                }
            }
        }

        return $collectedPatches;
    }
protected function collectSubpackagePatches ( array $ subPackages , $ allowedSubpatches ) { $ collectedPatches = new PatchCollection ( ) ; if ( $ allowedSubpatches !== false && $ allowedSubpatches !== array ( ) ) { foreach ( $ subPackages as $ subPackage ) { if ( $ allowedSubpatches === true || in_array ( $ subPackage -> getName ( ) , $ allowedSubpatches , true ) ) { $ collectedPatches -> merge ( $ this -> collectPatchesFromPackage ( $ subPackage ) ) ; } } } return $ collectedPatches ; }
Collect the patches from the sub-packages.

@param \Composer\Package\PackageInterface[] $subPackages the dependency packages
@param string[]|bool $allowedSubpatches TRUE to allow any sub-package; FALSE to allow no sub-packages; an array with allowed package names

@return \ComposerPatcher\PatchCollection
Collect the patches from the sub - packages .