Skip to content

Commit ea816fc

Browse files
authored
Merge branch refs/heads/1.12.x into 2.1.x
2 parents dd38409 + 80b40f2 commit ea816fc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/PhpDoc/TypeNodeResolver.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,6 +1260,10 @@ private function expandIntMaskToType(Type $type): ?Type
12601260
return IntegerRangeType::fromInterval($min, $max);
12611261
}
12621262

1263+
if (count($values) > InitializerExprTypeResolver::CALCULATE_SCALARS_LIMIT) {
1264+
return IntegerRangeType::fromInterval($min, $max);
1265+
}
1266+
12631267
return TypeCombinator::union(...array_map(static fn ($value) => new ConstantIntegerType($value), $values));
12641268
}
12651269

0 commit comments

Comments
 (0)