Skip to content

Commit

Permalink
Faster AddParamBasedOnParentClassMethodRector (#4805)
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm authored Aug 17, 2023
1 parent 2604a47 commit a85997a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ public function refactor(Node $node): ?Node
return null;
}

$parentClassMethod = $this->astResolver->resolveClassMethodFromMethodReflection($parentMethodReflection);
if (! $parentClassMethod instanceof ClassMethod) {
if ($parentMethodReflection->isPrivate()) {
return null;
}

if ($parentClassMethod->isPrivate()) {
$parentClassMethod = $this->astResolver->resolveClassMethodFromMethodReflection($parentMethodReflection);
if (! $parentClassMethod instanceof ClassMethod) {
return null;
}

Expand Down

0 comments on commit a85997a

Please sign in to comment.