Skip to content

Commit

Permalink
[Performance] [VendorLocker] Early allow change return type on privat…
Browse files Browse the repository at this point in the history
…e method on ClassMethodReturnTypeOverrideGuard::shouldSkipClassMethod() (#5642)
  • Loading branch information
samsonasik committed Feb 20, 2024
1 parent 23179d0 commit 522668e
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -32,6 +32,11 @@ public function shouldSkipClassMethod(ClassMethod $classMethod, Scope $scope): b
return true;
}

// early allow add return type on private method
if ($classMethod->isPrivate()) {
return false;
}

$classReflection = $this->reflectionResolver->resolveClassReflection($classMethod);
if (! $classReflection instanceof ClassReflection) {
return true;
Expand Down

0 comments on commit 522668e

Please sign in to comment.