-
-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve LocalMethodCallFinder performance #3651
Conversation
@@ -44,16 +44,16 @@ public function match(ClassMethod $classMethod): array | |||
$matchingMethodCalls = []; | |||
|
|||
foreach ($methodCalls as $methodCall) { | |||
$callerType = $this->nodeTypeResolver->getType($methodCall->var); | |||
if (! $callerType instanceof TypeWithClassName) { | |||
if (! $this->nodeNameResolver->isName($methodCall->name, $classMethodName)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doing the cheaper check first so we don't need to resolve the type of every methodcall->var
the failling job is unrelated. I saw this very same error also on other PRs |
That probably due to new phpdoc-parser release https://github.com/phpstan/phpdoc-parser/releases/tag/1.20.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you @staabm
leads to a 86% faster analysis when running rector on a folder of the phpstan-src codebase