Skip to content

Commit 724286f

Browse files
committed
Update ArrayType.php
1 parent 457b195 commit 724286f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Type/ArrayType.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,8 @@ public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $uni
372372
public function setExistingOffsetValueType(Type $offsetType, Type $valueType): Type
373373
{
374374
if ($this->itemType->isConstantArray()->yes() && $valueType->isConstantArray()->yes()) {
375-
$constArrays = $valueType->getConstantArrays();
376375
$newItemType = $this->itemType;
377-
foreach ($constArrays as $constArray) {
376+
foreach ($valueType->getConstantArrays() as $constArray) {
378377
foreach ($constArray->getKeyTypes() as $keyType) {
379378
$newItemType = $newItemType->setExistingOffsetValueType($keyType, $constArray->getOffsetValueType($keyType));
380379
}

0 commit comments

Comments
 (0)