Skip to content

Commit dfd423f

Browse files
committed
Use same operator for const and range int limits
1 parent 0c441a1 commit dfd423f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Analyser/TypeSpecifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,7 @@ private function specifyTypesForCountFuncCall(
11021102
if (
11031103
$sizeType instanceof IntegerRangeType
11041104
&& $sizeType->getMin() !== null
1105-
&& ($sizeType->getMax() ?? $sizeType->getMin()) <= ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT
1105+
&& ($sizeType->getMax() ?? $sizeType->getMin()) < ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT
11061106
&& $arrayType->getKeyType()->isSuperTypeOf(IntegerRangeType::fromInterval(0, ($sizeType->getMax() ?? $sizeType->getMin()) - 1))->yes()
11071107
) {
11081108
// turn optional offsets non-optional

0 commit comments

Comments
 (0)