Skip to content

Conversation

brambaud
Copy link

See #12741

For the moment, we only want to try a modification to see if existing tests passed. The next steps is to implement a test to reproduce the error then we'll re-implement the modification for real.

cc @ChinaskiJr

…aticMethodTypeSpecifyingExtension

For the moment, we only want to try a modification to see if existing tests passed.
The next steps is to implement a test to reproduce the error then we'll re-implement the modification for real.
$methodCalledOnType = $scope->getType($expr->var);
$methodReflection = $scope->getMethodReflection($methodCalledOnType, $expr->name->name);
if ($methodReflection !== null) {
$referencedClasses = $methodCalledOnType->getObjectClassNames();
Copy link
Contributor

@staabm staabm Mar 15, 2025

Choose a reason for hiding this comment

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

I think this can be simplified using getObjectClassReflections instead of getObjectClassNames.
that way you no longer need the reflectionProvider as you already get the ClassReflections returned.

(same for static call)

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.

2 participants