From bfa9fa7aa3e26ae677ee30fd3928d570d0282d90 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 3 Feb 2026 07:16:23 +0100 Subject: [PATCH] IterableType: Remove unnecessary work in toCoercedArgumentType() --- src/Type/IterableType.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Type/IterableType.php b/src/Type/IterableType.php index 46e004ae23..804fe27c7f 100644 --- a/src/Type/IterableType.php +++ b/src/Type/IterableType.php @@ -241,13 +241,7 @@ public function toCoercedArgumentType(bool $strictTypes): Type return TypeCombinator::union( $this, new ArrayType( - TypeCombinator::intersect( - $this->keyType->toArrayKey(), - new UnionType([ - new IntegerType(), - new StringType(), - ]), - ), + $this->keyType->toArrayKey(), $this->itemType, ), new GenericObjectType(Traversable::class, [