mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-25 12:14:02 +01:00
Invert the logic when getting the method name
This commit is contained in:
parent
6450a6b68b
commit
3839e68b4e
@ -70,12 +70,12 @@ final class MethodCallTypeResolver implements PerNodeTypeResolverInterface, Node
|
||||
{
|
||||
$parentCallerTypes = $this->resolveMethodCallVarTypes($methodCallNode);
|
||||
|
||||
if ($methodCallNode->name instanceof Identifier) {
|
||||
$methodName = $methodCallNode->name->toString();
|
||||
} else {
|
||||
$methodName = (string) $methodCallNode->name;
|
||||
if (! $methodCallNode->name instanceof Identifier) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$methodName = $methodCallNode->name->toString();
|
||||
|
||||
if (! $parentCallerTypes || ! $methodName) {
|
||||
return [];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user