Skip to content

Commit 3447717

Browse files
committed
Update TypeSpecifierContextReturnTypeExtension.php
1 parent 2c615a7 commit 3447717

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/PHPStan/Analyser/data/TypeSpecifierContextReturnTypeExtension.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ public function specifyTypes(
4444
TypeSpecifierContext $context,
4545
): SpecifiedTypes
4646
{
47+
if ($context->null()) {
48+
return new SpecifiedTypes();
49+
}
50+
4751
return $this->typeSpecifier->create(
4852
$node->getArgs()[0]->value,
4953
$context->getReturnType(),

0 commit comments

Comments
 (0)