1
0
Fork 0

Handle null return from getClosestNode()

pull/166/head
Felix Becker 2016-11-19 12:03:43 +01:00
parent 00bc8537a6
commit 8f6ee8dd02
1 changed files with 3 additions and 0 deletions

View File

@ -232,6 +232,9 @@ class DefinitionResolver
if ($className === 'self' || $className === 'static' || $className === 'parent') {
// self and static are resolved to the containing class
$classNode = getClosestNode($node, Node\Stmt\Class_::class);
if ($classNode === null) {
return null;
}
if ($className === 'parent') {
// parent is resolved to the parent class
if (!isset($n->extends)) {