Skip to content

Commit 5100d89

Browse files
authored
Make resolveExpressionNodeToType() handle null (#277)
1 parent b90ede7 commit 5100d89

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/DefinitionResolver.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,9 @@ public function resolveExpressionNodeToType(Node\Expr $expr): Type
448448
if (strtolower((string)$expr->name) === 'true' || strtolower((string)$expr->name) === 'false') {
449449
return new Types\Boolean;
450450
}
451+
if (strtolower((string)$expr->name) === 'null') {
452+
return new Types\Null_;
453+
}
451454
// Resolve constant
452455
$fqn = (string)($expr->getAttribute('namespacedName') ?? $expr->name);
453456
$def = $this->index->getDefinition($fqn, true);

0 commit comments

Comments
 (0)