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