Skip to content

Commit 9ca2718

Browse files
phpstan-botVincentLanglet
authored andcommitted
Fix CI failures [claude-ci-fix]
Automated fix attempt 1 for CI failures.
1 parent 1df597b commit 9ca2718

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Analyser/NodeScopeResolver.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4178,6 +4178,10 @@ function (MutatingScope $scope) use ($stmt, $expr, $nodeCallback, $context, $sto
41784178
$hasYield = true;
41794179
} elseif ($expr instanceof Expr\Match_) {
41804180
$deepContext = $context->enterDeep();
4181+
$condIsIncDec = $expr->cond instanceof Expr\PreInc
4182+
|| $expr->cond instanceof Expr\PostInc
4183+
|| $expr->cond instanceof Expr\PreDec
4184+
|| $expr->cond instanceof Expr\PostDec;
41814185
$condType = $scope->getType($expr->cond);
41824186
$condNativeType = $scope->getNativeType($expr->cond);
41834187
$condResult = $this->processExprNode($stmt, $expr->cond, $scope, $storage, $nodeCallback, $deepContext);
@@ -4186,7 +4190,7 @@ function (MutatingScope $scope) use ($stmt, $expr, $nodeCallback, $context, $sto
41864190
$throwPoints = $condResult->getThrowPoints();
41874191
$impurePoints = $condResult->getImpurePoints();
41884192
$isAlwaysTerminating = $condResult->isAlwaysTerminating();
4189-
$matchScope = $scope->enterMatch($expr, $condType, $condNativeType);
4193+
$matchScope = $scope->enterMatch($expr, $condIsIncDec ? $condType : null, $condIsIncDec ? $condNativeType : null);
41904194
$armNodes = [];
41914195
$hasDefaultCond = false;
41924196
$hasAlwaysTrueCond = false;

0 commit comments

Comments
 (0)