Skip to content

Commit f76a69c

Browse files
committed
Update TypeCombinator.php
1 parent 1c20a48 commit f76a69c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Type/TypeCombinator.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -814,14 +814,13 @@ private static function processArrayTypes(array $arrayTypes): array
814814
foreach ($constantArrays as $constantArray) {
815815
$valueTypes = $constantArray->getValueTypes();
816816
foreach ($constantArray->getKeyTypes() as $i => $keyType) {
817-
$keyTypeValue = $keyType->getValue();
818-
819-
$keyTypesForGeneralArray[$keyTypeValue] = $keyType;
820817
$valueTypesForGeneralArray[] = $valueTypes[$i];
821818

819+
$keyTypeValue = $keyType->getValue();
822820
if (array_key_exists($keyTypeValue, $constantKeyTypesNumbered)) {
823821
continue;
824822
}
823+
$keyTypesForGeneralArray[$keyTypeValue] = $keyType;
825824

826825
$constantKeyTypesNumbered[$keyTypeValue] = $nextConstantKeyTypeIndex;
827826
$nextConstantKeyTypeIndex *= 2;

0 commit comments

Comments
 (0)