Skip to content

Commit a2646e6

Browse files
committed
Update ConstantArrayType.php
1 parent 3c92e2b commit a2646e6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Type/Constant/ConstantArrayType.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public function getIterableValueType(): Type
171171

172172
$count = count($this->valueTypes);
173173
if ($count === 0) {
174-
return new NeverType(true);
174+
return $this->iterableValueType = new NeverType(true);
175175
}
176176

177177
if ($count > 16) {
@@ -184,11 +184,11 @@ public function getIterableValueType(): Type
184184
}
185185

186186
if ($onlyClosureValues) {
187-
return new CallableType();
187+
return $this->iterableValueType = new CallableType();
188188
}
189189
}
190190

191-
return TypeCombinator::union(...$this->valueTypes);
191+
return $this->iterableValueType = TypeCombinator::union(...$this->valueTypes);
192192
}
193193

194194
public function getKeyType(): Type

0 commit comments

Comments
 (0)