Skip to content

Commit

Permalink
re-fixed [Closes #72]
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Feb 24, 2021
1 parent f662444 commit 119f01a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/PhpGenerator/Printer.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ public function printType(?string $type, bool $nullable = false, PhpNamespace $n
$type = $namespace->unresolveUnionType($type);
}
if ($nullable && strcasecmp($type, 'mixed')) {
$type = strpos('|', $type) === false
$type = strpos($type, '|') === false
? '?' . $type
: $type . '|null';
}
Expand Down
2 changes: 1 addition & 1 deletion tests/PhpGenerator/expected/ClassType.expect
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ abstract class Example extends ParentClass implements IExample, IOne
}


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

0 comments on commit 119f01a

Please sign in to comment.