Skip to content

Commit b9f6c80

Browse files
staabmondrejmirtes
authored andcommitted
TypeCombinator: remove unnecessary loop
1 parent 9389eb1 commit b9f6c80

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Type/TypeCombinator.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,6 @@ public static function union(Type ...$types): Type
234234
unset($types[$i]);
235235
}
236236

237-
foreach ($scalarTypes as $classType => $scalarTypeItems) {
238-
$scalarTypes[$classType] = array_values($scalarTypeItems);
239-
}
240-
241237
$enumCaseTypes = array_values($enumCaseTypes);
242238
usort(
243239
$integerRangeTypes,
@@ -260,6 +256,7 @@ public static function union(Type ...$types): Type
260256
continue;
261257
}
262258

259+
$scalarTypeItems = array_values($scalarTypeItems);
263260
$scalarTypeItemsCount = count($scalarTypeItems);
264261
for ($i = 0; $i < $typesCount; $i++) {
265262
for ($j = 0; $j < $scalarTypeItemsCount; $j++) {

0 commit comments

Comments
 (0)