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 598a82d commit f13af95Copy full SHA for f13af95
src/Analyser/NodeScopeResolver.php
@@ -791,6 +791,9 @@ private function processStmtNode(
791
new StatementExitPoint($stmt, $scope),
792
], $overridingThrowPoints ?? $throwPoints, $impurePoints);
793
} elseif ($stmt instanceof Node\Stmt\Expression) {
794
+ if ($stmt->expr instanceof Expr\Throw_) {
795
+ $scope = $stmtScope;
796
+ }
797
$earlyTerminationExpr = $this->findEarlyTerminatingExpr($stmt->expr, $scope);
798
$hasAssign = false;
799
$currentScope = $scope;
0 commit comments