Skip to content

Comments

Remove callable.nonNativeMethod#5004

Merged
ondrejmirtes merged 2 commits intophpstan:2.1.xfrom
VincentLanglet:fixx/13596
Feb 19, 2026
Merged

Remove callable.nonNativeMethod#5004
ondrejmirtes merged 2 commits intophpstan:2.1.xfrom
VincentLanglet:fixx/13596

Conversation

@VincentLanglet
Copy link
Contributor

@VincentLanglet VincentLanglet commented Feb 19, 2026

->build();

return $errors;
return $this->methodCallCheck->check($scope, $methodNameName, $node->getVar(), $node->getName())[0];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the returning of the array shape with the method reflection might have been introduced exactly because of this. It might be possible to simplify the return type and let it just returns errors instead of the tuple.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked and the shape seems to always have existed, and the methodReflection is used somewhere else

private function processSingleMethodCall(Scope $scope, MethodCall $node, string $methodName): array

@VincentLanglet VincentLanglet marked this pull request as ready for review February 19, 2026 22:37
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@ondrejmirtes ondrejmirtes merged commit 56c1e37 into phpstan:2.1.x Feb 19, 2026
645 of 652 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants