Skip to content

Commit f0d3f4c

Browse files
committed
fix phpstan
1 parent 3dd95cd commit f0d3f4c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Analyser/NodeScopeResolver.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,9 @@ public function processNodes(
326326
$nextStatements[] = $nextStmt;
327327
}
328328

329-
$nodeCallback(new UnreachableStatementNode($unreachableStatement, $nextStatements), $scope);
329+
if ($unreachableStatement instanceof Node\Stmt) {
330+
$nodeCallback(new UnreachableStatementNode($unreachableStatement, $nextStatements), $scope);
331+
}
330332
}
331333
}
332334

@@ -431,7 +433,9 @@ public function processStmtNodes(
431433
$nextStatements[] = $nextStmt;
432434
}
433435

434-
$nodeCallback(new UnreachableStatementNode($unreachableStatement, $nextStatements), $scope);
436+
if ($unreachableStatement instanceof Node\Stmt) {
437+
$nodeCallback(new UnreachableStatementNode($unreachableStatement, $nextStatements), $scope);
438+
}
435439
}
436440

437441
$statementResult = new StatementResult($scope, $hasYield, $alreadyTerminated, $exitPoints, $throwPoints, $impurePoints);

0 commit comments

Comments
 (0)