Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rajyan committed Jan 7, 2023
1 parent ddd9d7a commit a961cc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Type/TypeCombinator.php
Expand Up @@ -142,7 +142,7 @@ public static function union(Type ...$types): Type
}
if (count($innerTypes) === 0) {
$typesCount--;
unset($types[$i]);
array_splice($types, $i--, 1);
continue;
}
if (count($innerTypes) === 1) {
Expand Down Expand Up @@ -248,7 +248,7 @@ public static function union(Type ...$types): Type
}
}

return new UnionType($resultTypes, true);
return new UnionType($types, true);
}

/**
Expand Down

0 comments on commit a961cc9

Please sign in to comment.