Skip to content

Commit d5aaa3f

Browse files
committed
cs
1 parent fa17836 commit d5aaa3f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/Analyser/MutatingScope.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2705,13 +2705,15 @@ public function specifyExpressionType(Expr $expr, Type $type, Type $nativeType,
27052705
$hasOffsetAccessoryCount = 0;
27062706
foreach ($exprVarType->getTypes() as $innerType) {
27072707
foreach (TypeUtils::getAccessoryTypes($innerType) as $accessoryType) {
2708-
if ($accessoryType instanceof HasOffsetValueType) {
2709-
$hasOffsetAccessoryCount++;
2708+
if (!($accessoryType instanceof HasOffsetValueType)) {
2709+
continue;
2710+
}
2711+
2712+
$hasOffsetAccessoryCount++;
27102713

2711-
if ($hasOffsetAccessoryCount > self::ARRAY_DIM_FETCH_UNION_TYPE_LIMIT) {
2712-
$tooComplex = true;
2713-
break 2;
2714-
}
2714+
if ($hasOffsetAccessoryCount > self::ARRAY_DIM_FETCH_UNION_TYPE_LIMIT) {
2715+
$tooComplex = true;
2716+
break 2;
27152717
}
27162718
}
27172719
}

0 commit comments

Comments
 (0)