Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
rajyan committed Dec 21, 2022
1 parent 092264b commit 04ccb01
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Type/TypeCombinator.php
Expand Up @@ -134,11 +134,12 @@ public static function union(Type ...$types): Type
if ($types[$i]->isNormalized()) {
$innerTypes = $types[$i]->getTypes();
foreach ($innerTypes as $key => $innerType) {
if ($innerType->isArray()->yes()) {
$types[] = $innerType;
unset($innerTypes[$key]);
$typesCount++;
if (!$innerType->isArray()->yes() && !($innerType instanceof ConstantScalarType)) {
continue;
}
$types[] = $innerType;
unset($innerTypes[$key]);
$typesCount++;
}
if (count($innerTypes) === 0) {
$typesCount--;
Expand Down

0 comments on commit 04ccb01

Please sign in to comment.