We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bbd64a9 commit 0464301Copy full SHA for 0464301
src/Analyser/TypeSpecifier.php
@@ -268,19 +268,12 @@ public function specifyTypesInCondition(
268
if ($argType instanceof UnionType) {
269
$countableInterface = new ObjectType(Countable::class);
270
foreach ($argType->getTypes() as $innerType) {
271
- if (
272
- $innerType->isArray()->yes()
273
- ) {
+ if ($innerType->isArray()->yes()) {
274
$innerType = TypeCombinator::intersect(new NonEmptyArrayType(), $innerType);
275
- if ($innerType->isList()->yes()) {
276
- $innerType = AccessoryArrayListType::intersectWith($innerType);
277
- }
278
$countables[] = $innerType;
279
}
280
281
282
- !$countableInterface->isSuperTypeOf($innerType)->yes()
283
+ if (!$countableInterface->isSuperTypeOf($innerType)->yes()) {
284
continue;
285
286
0 commit comments