src/PatchCollector.php
protected function collectPatchesFromPackage(PackageInterface $package)
    {
        $collectedPatches = new PatchCollection();
        $extra = $package->getExtra();
        if (isset($extra['patches'])) {
            $this->io->write('<info>Gathering patches from '.$package->getName().' (extra.patches).</info>');
            $collectedPatches->merge($this->resolveExplicitList($package, $extra['patches']));
        }
        if (isset($extra['patches-file'])) {
            $this->io->write('<info>Gathering patches from '.$package->getName().' (extra.patches-file).</info>');
            $collectedPatches->merge($this->resolveJsonFile($package, $extra['patches-file']));
        }

        return $collectedPatches;
    }
protected function collectPatchesFromPackage(PackageInterface $package)
    {
        $collectedPatches = new PatchCollection();
        $extra = $package->getExtra();
        if (isset($extra['patches'])) {
            $this->io->write('<info>Gathering patches from '.$package->getName().' (extra.patches).</info>');
            $collectedPatches->merge($this->resolveExplicitList($package, $extra['patches']));
        }
        if (isset($extra['patches-file'])) {
            $this->io->write('<info>Gathering patches from '.$package->getName().' (extra.patches-file).</info>');
            $collectedPatches->merge($this->resolveJsonFile($package, $extra['patches-file']));
        }

        return $collectedPatches;
    }
protected function collectPatchesFromPackage ( PackageInterface $ package ) { $ collectedPatches = new PatchCollection ( ) ; $ extra = $ package -> getExtra ( ) ; if ( isset ( $ extra [ 'patches' ] ) ) { $ this -> io -> write ( '<info>Gathering patches from ' . $ package -> getName ( ) . ' (extra.patches).</info>' ) ; $ collectedPatches -> merge ( $ this -> resolveExplicitList ( $ package , $ extra [ 'patches' ] ) ) ; } if ( isset ( $ extra [ 'patches-file' ] ) ) { $ this -> io -> write ( '<info>Gathering patches from ' . $ package -> getName ( ) . ' (extra.patches-file).</info>' ) ; $ collectedPatches -> merge ( $ this -> resolveJsonFile ( $ package , $ extra [ 'patches-file' ] ) ) ; } return $ collectedPatches ; }
Collect the patches from a package.

@param \Composer\Package\PackageInterface $package the package to be inspected

@return \ComposerPatcher\PatchCollection
Collect the patches from a package .