Skip to content
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

Support CallLike with variable method name #3553

Draft
wants to merge 1 commit into
base: 2.0.x
Choose a base branch
from

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Oct 8, 2024

@staabm
Copy link
Contributor Author

staabm commented Oct 8, 2024

just now saw the feedback in phpstan/phpstan#2920 (comment) - will consider

Comment on lines +37 to +39
if ($node->name instanceof Node\Identifier) {
$methodNames = [$node->name->name];
} else {
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 see there are a lot of rules which early exit on :

if (!$node->name instanceof Node\Identifier) {
			return [];
}

maybe these are easy to enhance with a similar check I did here.
(just supporting the getConstantStrings() case)

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.

Variable function support
1 participant