Skip to content

Commit

Permalink
[CodingStyle] Clean up getParents() call on MakeInheritedMethodVisibi…
Browse files Browse the repository at this point in the history
…litySameAsParentRector (#2246)
  • Loading branch information
samsonasik committed May 7, 2022
1 parent 6d814fb commit 26cad67
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ public function refactorWithScope(Node $node, Scope $scope): ?Node
return null;
}

if ($classReflection->getParents() === []) {
$parentClassReflections = $classReflection->getParents();

if ($parentClassReflections === []) {
return null;
}

$parentClassReflections = $classReflection->getParents();

foreach ($node->getMethods() as $classMethod) {
if ($classMethod->isMagic()) {
continue;
Expand Down

0 comments on commit 26cad67

Please sign in to comment.