We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c441a1 commit dfd423fCopy full SHA for dfd423f
src/Analyser/TypeSpecifier.php
@@ -1102,7 +1102,7 @@ private function specifyTypesForCountFuncCall(
1102
if (
1103
$sizeType instanceof IntegerRangeType
1104
&& $sizeType->getMin() !== null
1105
- && ($sizeType->getMax() ?? $sizeType->getMin()) <= ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT
+ && ($sizeType->getMax() ?? $sizeType->getMin()) < ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT
1106
&& $arrayType->getKeyType()->isSuperTypeOf(IntegerRangeType::fromInterval(0, ($sizeType->getMax() ?? $sizeType->getMin()) - 1))->yes()
1107
) {
1108
// turn optional offsets non-optional
0 commit comments