Skip to content

Commit 0464301

Browse files
staabmondrejmirtes
authored andcommitted
Cleanup TypeSpecifier
1 parent bbd64a9 commit 0464301

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

Diff for: src/Analyser/TypeSpecifier.php

+2-9
Original file line numberDiff line numberDiff line change
@@ -268,19 +268,12 @@ public function specifyTypesInCondition(
268268
if ($argType instanceof UnionType) {
269269
$countableInterface = new ObjectType(Countable::class);
270270
foreach ($argType->getTypes() as $innerType) {
271-
if (
272-
$innerType->isArray()->yes()
273-
) {
271+
if ($innerType->isArray()->yes()) {
274272
$innerType = TypeCombinator::intersect(new NonEmptyArrayType(), $innerType);
275-
if ($innerType->isList()->yes()) {
276-
$innerType = AccessoryArrayListType::intersectWith($innerType);
277-
}
278273
$countables[] = $innerType;
279274
}
280275

281-
if (
282-
!$countableInterface->isSuperTypeOf($innerType)->yes()
283-
) {
276+
if (!$countableInterface->isSuperTypeOf($innerType)->yes()) {
284277
continue;
285278
}
286279

0 commit comments

Comments
 (0)