File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -232,7 +232,13 @@ private function resolveDefinition(PHPReflector|PHPReflectionType|string $reflec
232232 }
233233
234234 if ($ reflector instanceof PHPReflectionParameter || $ reflector instanceof PHPReflectionProperty) {
235- return $ this ->resolveDefinition ($ reflector ->getType ());
235+ $ type = $ reflector ->getType ();
236+
237+ if ($ type === null ) {
238+ return 'mixed ' ;
239+ }
240+
241+ return $ this ->resolveDefinition ($ type );
236242 }
237243
238244 if ($ reflector instanceof PHPReflectionClass) {
@@ -267,7 +273,9 @@ private function resolveIsNullable(PHPReflectionType|PHPReflector|string $reflec
267273 }
268274
269275 if ($ reflector instanceof PHPReflectionParameter || $ reflector instanceof PHPReflectionProperty) {
270- return $ reflector ->getType ()->allowsNull ();
276+ $ type = $ reflector ->getType ();
277+
278+ return $ type === null || $ type ->allowsNull ();
271279 }
272280
273281 if ($ reflector instanceof PHPReflectionType) {
You can’t perform that action at this time.
0 commit comments