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; }