File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 215215use function array_values ;
216216use function base64_decode ;
217217use function count ;
218+ use function get_class ;
218219use function in_array ;
219220use function is_array ;
220221use 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 }
You can’t perform that action at this time.
0 commit comments