Skip to content

Commit

Permalink
check type
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed May 30, 2024
1 parent eb46e12 commit e0c3291
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Command/PrivatizeConstantsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ private function replacePrivateConstWith(ClassConstMatch $publicClassConstMatch,

// @todo handle case when "AppBundle\Rpc\BEItem\BeItemPackage::ITEM_TYPE_NAME_PACKAGE" constant is in parent class
$parentClassConstMatch = $publicClassConstMatch->getParentClassConstMatch();
if (! $parentClassConstMatch instanceof ClassConstMatch) {
return;
}

$this->replacePrivateConstWith($parentClassConstMatch, $replaceString);
}
}

0 comments on commit e0c3291

Please sign in to comment.