Skip to content

Commit e940c0d

Browse files
committed
reorder
1 parent 9deb8f8 commit e940c0d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Analyser/TypeSpecifier.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,9 @@ public function specifyTypesInCondition(
360360
&& $expr->right->left->name instanceof Name
361361
&& in_array(strtolower((string) $expr->right->left->name), ['count', 'sizeof'], true)
362362
&& count($expr->right->left->getArgs()) >= 1
363-
&& $leftType->isInteger()->yes()
363+
// constant offsets are handled via HasOffsetType/HasOffsetValueType
364364
&& !$leftType instanceof ConstantIntegerType
365+
&& $leftType->isInteger()->yes()
365366
&& IntegerRangeType::fromInterval(0, null)->isSuperTypeOf($leftType)->yes()
366367
) {
367368
$countArgType = $scope->getType($expr->right->left->getArgs()[0]->value);

0 commit comments

Comments
 (0)