Skip to content

Commit 156b60f

Browse files
committed
Fix generating null return type from reflection in TypeGenerator
The TypeGenerator failed with "type 'null' cannot be nullable" when `fromReflectionType()` was called for a method with a return type "null" due to a incorrect comparison with the string "null". This change corrects the comparison so that such methods are reflected without errors. Obvious fix.
1 parent 169123b commit 156b60f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Generator/TypeGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static function fromReflectionType(
6969

7070
return new self(
7171
$atomicType,
72-
$atomicType->type !== 'mixed' && $atomicType !== 'null' && $type->allowsNull()
72+
$atomicType->type !== 'mixed' && $atomicType->type !== 'null' && $type->allowsNull()
7373
);
7474
}
7575

0 commit comments

Comments
 (0)