Skip to content

Commit 14943f7

Browse files
committed
handle ?null
1 parent 6362ade commit 14943f7

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/functions.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ function toUnionParameter(string ...$types): UnionParameterInterface
349349

350350
function toParameter(string $type): ParameterInterface
351351
{
352+
$type = str_replace('?', 'null|', $type);
352353
if (str_contains($type, '|')) {
353354
return toUnionParameter(...explode('|', $type));
354355
}

0 commit comments

Comments
 (0)