Skip to content

Commit

Permalink
[Exclusion] Check Parent attribute is Node on ExclusionManager::isNod…
Browse files Browse the repository at this point in the history
…eSkippedByRector() (#712)
  • Loading branch information
samsonasik committed Aug 18, 2021
1 parent c3c1411 commit 582d1d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Exclusion/ExclusionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public function isNodeSkippedByRector(Node $node, PhpRectorInterface $phpRector)
{
if ($node instanceof PropertyProperty || $node instanceof Const_) {
$node = $node->getAttribute(AttributeKey::PARENT_NODE);
if (! $node instanceof Node) {
return false;
}
}

if ($this->hasNoRectorPhpDocTagMatch($node, $phpRector)) {
Expand Down

0 comments on commit 582d1d3

Please sign in to comment.