Skip to content

Commit e4767e5

Browse files
Fix
1 parent 81511ba commit e4767e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Resource/ReflectionClassResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ private function generateSignature(\ReflectionClass $class)
197197
} else {
198198
$t = \PHP_VERSION_ID >= 70000 ? $p->getType() : '';
199199
$stack[] = $p->isOptional();
200-
$stack[] = $t instanceof \ReflectionNamedType ? $t->getName() : (string) $t;
200+
$stack[] = $t instanceof \ReflectionNamedType ? ((string) $t->allowsNull()).$t->getName() : (string) $t;
201201
$stack[] = $p->isPassedByReference();
202202
$stack[] = \PHP_VERSION_ID >= 50600 ? $p->isVariadic() : '';
203203
$stack[] = $p->getName();

0 commit comments

Comments
 (0)