1
0
Fork 0

ci: Add ability to find documentation for static functions defined in parent contexts

pull/679/head
Martin Letáček 2018-10-28 21:00:00 +01:00
parent 18c6ccd137
commit df1444502c
1 changed files with 24 additions and 12 deletions

View File

@ -493,6 +493,7 @@ class DefinitionResolver
} elseif ($scoped->scopeResolutionQualifier instanceof Node\QualifiedName) { } elseif ($scoped->scopeResolutionQualifier instanceof Node\QualifiedName) {
$className = $scoped->scopeResolutionQualifier->getResolvedName(); $className = $scoped->scopeResolutionQualifier->getResolvedName();
} }
do {
if ($scoped->memberName instanceof Node\Expression\Variable) { if ($scoped->memberName instanceof Node\Expression\Variable) {
if ($scoped->parent instanceof Node\Expression\CallExpression) { if ($scoped->parent instanceof Node\Expression\CallExpression) {
return null; return null;
@ -508,6 +509,17 @@ class DefinitionResolver
if ($scoped->parent instanceof Node\Expression\CallExpression) { if ($scoped->parent instanceof Node\Expression\CallExpression) {
$name .= '()'; $name .= '()';
} }
$definition = $this->index->getDefinition($name);
if(!!$definition) {
break;
} else {
$class = $this->index->getDefinition((string)$className);
if(!$class) {
break;
}
$className = $class->extends[0];
}
} while (true);
return $name; return $name;
} }