File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1103,9 +1103,14 @@ private function specifyTypesForCountFuncCall(
1103
1103
$ sizeType instanceof IntegerRangeType
1104
1104
&& $ sizeType ->getMin () !== null
1105
1105
&& $ sizeType ->getMin () <= ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT
1106
- && ($ sizeType ->getMax () === null || $ sizeType ->getMax () - $ sizeType ->getMin () <= ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT )
1107
1106
&& $ arrayType ->getKeyType ()->isSuperTypeOf (IntegerRangeType::fromInterval (0 , $ sizeType ->getMin () - 1 ))->yes ()
1108
- && ($ sizeType ->getMax () === null || $ arrayType ->getKeyType ()->isSuperTypeOf (IntegerRangeType::fromInterval (0 , $ sizeType ->getMax () - 1 ))->yes ())
1107
+ && (
1108
+ $ sizeType ->getMax () === null
1109
+ || (
1110
+ $ sizeType ->getMax () <= ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT
1111
+ && $ arrayType ->getKeyType ()->isSuperTypeOf (IntegerRangeType::fromInterval (0 , $ sizeType ->getMax () - 1 ))->yes ()
1112
+ )
1113
+ )
1109
1114
) {
1110
1115
// turn optional offsets non-optional
1111
1116
$ valueTypesBuilder = ConstantArrayTypeBuilder::createEmpty ();
You can’t perform that action at this time.
0 commit comments