1
0
Fork 0
pull/362/head
Fillip Hannisdal 2017-04-22 16:51:01 +01:00
parent b1cc7bf6b0
commit af900372b3
1 changed files with 9 additions and 0 deletions

View File

@ -448,7 +448,13 @@ class DefinitionResolver
} }
$fqn = (string)($expr->getAttribute('namespacedName') ?? $expr->name) . '()'; $fqn = (string)($expr->getAttribute('namespacedName') ?? $expr->name) . '()';
$def = $this->index->getDefinition($fqn, true); $def = $this->index->getDefinition($fqn, true);
if (strtolower((string)$def) === 'null') {
return new Types\Null_;
}
if ($def !== null) { if ($def !== null) {
if ( null === $def->type ) {
return new Types\Mixed;
}
return $def->type; return $def->type;
} }
} }
@ -463,6 +469,9 @@ class DefinitionResolver
$fqn = (string)($expr->getAttribute('namespacedName') ?? $expr->name); $fqn = (string)($expr->getAttribute('namespacedName') ?? $expr->name);
$def = $this->index->getDefinition($fqn, true); $def = $this->index->getDefinition($fqn, true);
if ($def !== null) { if ($def !== null) {
if ( null === $def->type ) {
return new Types\Mixed;
}
return $def->type; return $def->type;
} }
} }