src/PatchCollector.php
public function collectPatches(RootPackageInterface $rootPackage, array $subPackages)
    {
        $collectedPatches = $this->collectPatchesFromPackage($rootPackage);
        $extra = $rootPackage->getExtra();
        if (isset($extra['allow-subpatches'])) {
            $allowedSubpatches = $extra['allow-subpatches'];
            if (!is_bool($allowedSubpatches) && !is_array($allowedSubpatches)) {
                $this->handleException(new Exception\InvalidPackageConfigurationValue($rootPackage, 'extra.allow-subpatches', $allowedSubpatches, 'The extra.allow-subpatches must be a boolean or an array of strings.'));
            }
            $collectedPatches->merge($this->collectSubpackagePatches($subPackages, $allowedSubpatches));
        }

        return $collectedPatches;
    }
public function collectPatches(RootPackageInterface $rootPackage, array $subPackages)
    {
        $collectedPatches = $this->collectPatchesFromPackage($rootPackage);
        $extra = $rootPackage->getExtra();
        if (isset($extra['allow-subpatches'])) {
            $allowedSubpatches = $extra['allow-subpatches'];
            if (!is_bool($allowedSubpatches) && !is_array($allowedSubpatches)) {
                $this->handleException(new Exception\InvalidPackageConfigurationValue($rootPackage, 'extra.allow-subpatches', $allowedSubpatches, 'The extra.allow-subpatches must be a boolean or an array of strings.'));
            }
            $collectedPatches->merge($this->collectSubpackagePatches($subPackages, $allowedSubpatches));
        }

        return $collectedPatches;
    }
public function collectPatches ( RootPackageInterface $ rootPackage , array $ subPackages ) { $ collectedPatches = $ this -> collectPatchesFromPackage ( $ rootPackage ) ; $ extra = $ rootPackage -> getExtra ( ) ; if ( isset ( $ extra [ 'allow-subpatches' ] ) ) { $ allowedSubpatches = $ extra [ 'allow-subpatches' ] ; if ( ! is_bool ( $ allowedSubpatches ) && ! is_array ( $ allowedSubpatches ) ) { $ this -> handleException ( new Exception \ InvalidPackageConfigurationValue ( $ rootPackage , 'extra.allow-subpatches' , $ allowedSubpatches , 'The extra.allow-subpatches must be a boolean or an array of strings.' ) ) ; } $ collectedPatches -> merge ( $ this -> collectSubpackagePatches ( $ subPackages , $ allowedSubpatches ) ) ; } return $ collectedPatches ; }
Collect the patches.

@param \Composer\Package\RootPackageInterface $rootPackage the root composer package
@param \Composer\Package\PackageInterface[] $subPackages the dependency packages

@return \ComposerPatcher\PatchCollection
Collect the patches .