Fix: Small fixes
parent
6fa6fd57db
commit
d231f425b9
|
@ -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();
|
||||||
}
|
}
|
||||||
|
$origName = null;
|
||||||
do {
|
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) {
|
||||||
|
@ -509,13 +510,16 @@ class DefinitionResolver
|
||||||
if ($scoped->parent instanceof Node\Expression\CallExpression) {
|
if ($scoped->parent instanceof Node\Expression\CallExpression) {
|
||||||
$name .= '()';
|
$name .= '()';
|
||||||
}
|
}
|
||||||
|
if ($origName === null) {
|
||||||
|
$origName = $name;
|
||||||
|
}
|
||||||
$definition = $this->index->getDefinition($name);
|
$definition = $this->index->getDefinition($name);
|
||||||
if (!!$definition) {
|
if (!!$definition) {
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
$class = $this->index->getDefinition((string)$className);
|
$class = $this->index->getDefinition((string)$className);
|
||||||
if ($class === null || empty($class->extends)) {
|
if ($class === null || empty($class->extends)) {
|
||||||
return null;
|
return $origName;
|
||||||
}
|
}
|
||||||
$className = $class->extends[0];
|
$className = $class->extends[0];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue