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 bd60051 commit 14b1988Copy full SHA for 14b1988
src/Parser/ArrayMapArgVisitor.php
@@ -31,8 +31,10 @@ public function enterNode(Node $node): ?Node
31
if ($args[1]->name !== null && $args[1]->name->name === 'callback') {
32
$callbackPos = 1;
33
}
34
- [$callback] = array_splice($args, $callbackPos, 1);
35
- $callback->value->setAttribute(self::ATTRIBUTE_NAME, $args);
+ $callbackArg = $args[$callbackPos];
+ $arrayArgs = $args;
36
+ array_splice($arrayArgs, $callbackPos, 1);
37
+ $callbackArg->value->setAttribute(self::ATTRIBUTE_NAME, $arrayArgs);
38
39
return null;
40
0 commit comments