From 0ff2a7db213c1bc0cdcd7ff87897e569f706758f Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Thu, 22 Aug 2024 18:19:00 +0200 Subject: [PATCH] Cleanup TypeSpecifier --- src/Analyser/TypeSpecifier.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/Analyser/TypeSpecifier.php b/src/Analyser/TypeSpecifier.php index 1c1732089d..9656c2d723 100644 --- a/src/Analyser/TypeSpecifier.php +++ b/src/Analyser/TypeSpecifier.php @@ -268,19 +268,12 @@ public function specifyTypesInCondition( if ($argType instanceof UnionType) { $countableInterface = new ObjectType(Countable::class); foreach ($argType->getTypes() as $innerType) { - if ( - $innerType->isArray()->yes() - ) { + if ($innerType->isArray()->yes()) { $innerType = TypeCombinator::intersect(new NonEmptyArrayType(), $innerType); - if ($innerType->isList()->yes()) { - $innerType = AccessoryArrayListType::intersectWith($innerType); - } $countables[] = $innerType; } - if ( - !$countableInterface->isSuperTypeOf($innerType)->yes() - ) { + if (!$countableInterface->isSuperTypeOf($innerType)->yes()) { continue; }