mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 19:53:14 +01:00
fix static method in reflection for StaticCallOnNonStaticToInstanceCallRector (#1556)
fix static method in reflection for StaticCallOnNonStaticToInstanceCallRector
This commit is contained in:
commit
c7dcf686e4
@ -126,7 +126,6 @@ CODE_SAMPLE
|
||||
}
|
||||
|
||||
// can we add static to method?
|
||||
|
||||
$classMethodNode = $this->parsedNodesByType->findMethod($methodName, $className);
|
||||
if ($classMethodNode === null) {
|
||||
return null;
|
||||
|
@ -336,6 +336,9 @@ final class ParsedNodesByType
|
||||
)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$methodReflection = $reflectionClass->getMethod($methodName);
|
||||
return $methodReflection->isStatic();
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user