fix static method in reflection for StaticCallOnNonStaticToInstanceCallRector (#1556)

fix static method in reflection for StaticCallOnNonStaticToInstanceCallRector
This commit is contained in:
Tomáš Votruba 2019-06-04 15:19:31 +03:00 committed by GitHub
commit c7dcf686e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -126,7 +126,6 @@ CODE_SAMPLE
}
// can we add static to method?
$classMethodNode = $this->parsedNodesByType->findMethod($methodName, $className);
if ($classMethodNode === null) {
return null;

View File

@ -336,6 +336,9 @@ final class ParsedNodesByType
)) {
return true;
}
$methodReflection = $reflectionClass->getMethod($methodName);
return $methodReflection->isStatic();
}
return false;