Fixed setting a variable inside an IF
parent
66634a4045
commit
faf7b12d47
|
@ -483,7 +483,8 @@ class DefinitionResolver
|
||||||
if ($expr instanceof Node\Expr\MethodCall) {
|
if ($expr instanceof Node\Expr\MethodCall) {
|
||||||
$fqn .= '()';
|
$fqn .= '()';
|
||||||
}
|
}
|
||||||
if ($def = $this->index->getDefinition($fqn)) {
|
$def = $this->index->getDefinition($fqn);
|
||||||
|
if ($def !== null) {
|
||||||
if ($def->type instanceof Types\This || $def->type instanceof Types\Self_) {
|
if ($def->type instanceof Types\This || $def->type instanceof Types\Self_) {
|
||||||
return $this->resolveExpressionNodeToType($expr->var);
|
return $this->resolveExpressionNodeToType($expr->var);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue