Skip to content

Commit 119f01a

Browse files
committed
re-fixed [Closes #72]
1 parent f662444 commit 119f01a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/PhpGenerator/Printer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ public function printType(?string $type, bool $nullable = false, PhpNamespace $n
300300
$type = $namespace->unresolveUnionType($type);
301301
}
302302
if ($nullable && strcasecmp($type, 'mixed')) {
303-
$type = strpos('|', $type) === false
303+
$type = strpos($type, '|') === false
304304
? '?' . $type
305305
: $type . '|null';
306306
}

tests/PhpGenerator/expected/ClassType.expect

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ abstract class Example extends ParentClass implements IExample, IOne
4343
}
4444

4545

46-
abstract public function show($item, array|null &$res = null, ?stdClass|string $bar = null);
46+
abstract public function show($item, array|null &$res = null, stdClass|string|null $bar = null);
4747
}

0 commit comments

Comments
 (0)