Skip to content

Commit

Permalink
Merge pull request #330 from hussainweb/patch-1
Browse files Browse the repository at this point in the history
Replace getJobType with an instanceof check
  • Loading branch information
cweagans committed Sep 30, 2020
2 parents bba9dab + 22397c8 commit ae02121
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Patches.php
Expand Up @@ -176,7 +176,7 @@ public function gatherPatches(PackageEvent $event) {
$operations = $event->getOperations();
$this->io->write('<info>Gathering patches for dependencies. This might take a minute.</info>');
foreach ($operations as $operation) {
if ($operation->getJobType() == 'install' || $operation->getJobType() == 'update') {
if ($operation instanceof InstallOperation || $operation instanceof UpdateOperation) {
$package = $this->getPackageFromOperation($operation);
$extra = $package->getExtra();
if (isset($extra['patches'])) {
Expand Down

0 comments on commit ae02121

Please sign in to comment.