From f06dcd7ddc9e1eb5a64d193cfea653f4cbfd2c36 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 26 May 2026 13:53:06 +0200 Subject: [PATCH] Cleanup ArrayType->tryRemove() --- src/Type/ArrayType.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Type/ArrayType.php b/src/Type/ArrayType.php index ebed9eedc2..c1db8f81f1 100644 --- a/src/Type/ArrayType.php +++ b/src/Type/ArrayType.php @@ -863,10 +863,6 @@ public function traverseSimultaneously(Type $right, callable $cb): Type public function tryRemove(Type $typeToRemove): ?Type { - if ($typeToRemove->isConstantArray()->yes() && $typeToRemove->isIterableAtLeastOnce()->no()) { - return TypeCombinator::intersect($this, new NonEmptyArrayType()); - } - if ($typeToRemove->isSuperTypeOf(new ConstantArrayType([], []))->yes()) { return TypeCombinator::intersect($this, new NonEmptyArrayType()); }