Skip to content

Commit d07cfbc

Browse files
committed
use proper LIMIT
1 parent 90d9ac9 commit d07cfbc

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/Type/Constant/ConstantArrayType.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $uni
706706
if (
707707
$scalarKeyTypes !== null
708708
&& count($scalarKeyTypes) >= 2
709-
&& count($scalarKeyTypes) <= self::CHUNK_FINITE_TYPES_LIMIT
709+
&& count($scalarKeyTypes) <= ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT
710710
) {
711711
$hasNewKey = false;
712712
foreach ($scalarKeyTypes as $scalarKeyType) {

‎tests/PHPStan/Analyser/nsrt/set-constant-union-offset-on-constant-array.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function doInfiniteRange(array $a, $intRange): void
4444
public function doUnionOfRanges(array $a, $intRange): void
4545
{
4646
$a[$intRange] = 256;
47-
assertType('non-empty-array<\'foo\'|int<0, 5>|int<10, 15>, int>', $a);
47+
assertType('array{foo: int, 0: 256}|array{foo: int, 10: 256}|array{foo: int, 11: 256}|array{foo: int, 12: 256}|array{foo: int, 13: 256}|array{foo: int, 14: 256}|array{foo: int, 15: 256}|array{foo: int, 1: 256}|array{foo: int, 2: 256}|array{foo: int, 3: 256}|array{foo: int, 4: 256}|array{foo: int, 5: 256}', $a);
4848
}
4949

5050
/**

0 commit comments

Comments
 (0)