Skip to content

Commit 3817a71

Browse files
DanielEScherzerkocsismate
authored andcommitted
gen_stub: remove impossible Type::__toString() handling
`Type::$types` is typed as an array, and thus can never be `null`. There is no need to have code to handle such a case.
1 parent daac8f8 commit 3817a71

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

build/gen_stub.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -726,10 +726,6 @@ public static function equals(?Type $a, ?Type $b): bool {
726726
}
727727

728728
public function __toString() {
729-
if ($this->types === null) {
730-
return 'mixed';
731-
}
732-
733729
$char = $this->isIntersection ? '&' : '|';
734730
return implode($char, array_map(
735731
function ($type) { return $type->name; },

0 commit comments

Comments
 (0)