Skip to content

Commit 727fc73

Browse files
committed
TMP CS fix
1 parent 307bfa7 commit 727fc73

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Analyser/NodeScopeResolver.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@
215215
use function array_values;
216216
use function base64_decode;
217217
use function count;
218+
use function get_class;
218219
use function in_array;
219220
use function is_array;
220221
use function is_int;
@@ -692,9 +693,7 @@ private function processStmtNode(
692693
$finder = new NodeFinder();
693694
foreach ($storage->pendingFibers as $pendingFiber) {
694695
$expr = $pendingFiber['request']->expr;
695-
$found = $finder->find($stmt->stmts, function ($node) use ($expr) {
696-
return $node === $expr;
697-
});
696+
$found = $finder->find($stmt->stmts, static fn ($node) => $node === $expr);
698697
if (count($found) > 0) {
699698
throw new ShouldNotHappenException(sprintf('%s - %d', get_class($expr), $expr->getStartLine()));
700699
}
@@ -900,9 +899,7 @@ private function processStmtNode(
900899
if ($stmt->stmts !== null) {
901900
foreach ($storage->pendingFibers as $pendingFiber) {
902901
$expr = $pendingFiber['request']->expr;
903-
$found = $finder->find($stmt->stmts, function ($node) use ($expr) {
904-
return $node === $expr;
905-
});
902+
$found = $finder->find($stmt->stmts, static fn ($node) => $node === $expr);
906903
if (count($found) > 0) {
907904
throw new ShouldNotHappenException(sprintf('%s - %d', get_class($expr), $expr->getStartLine()));
908905
}

0 commit comments

Comments
 (0)