protected function getPatchCollection()
    {
        if ($this->patchCollection === null) {
            $patchCollector = $this->getPatchCollector();
            $packages = $this->getLocalRepositoryPackages(true);
            $this->patchCollection = $patchCollector->collectPatches($this->composer->getPackage(), $packages);
        }

        return $this->patchCollection;
    }