Skip to content

Commit 01aacb3

Browse files
authored
Merge pull request #432 from derrabus/improvement/call-user-func
Use a variadic call instead of call_user_func_array()
2 parents cc979ec + c866ab8 commit 01aacb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DependencyInjection/Compiler/AddVotersPass.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
namespace Knp\Bundle\MenuBundle\DependencyInjection\Compiler;
44

55
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
6-
use Symfony\Component\DependencyInjection\ContainerBuilder;
76
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
7+
use Symfony\Component\DependencyInjection\ContainerBuilder;
88
use Symfony\Component\DependencyInjection\Reference;
99

1010
/**
@@ -43,7 +43,7 @@ public function process(ContainerBuilder $container): void
4343
}
4444

4545
krsort($voters);
46-
$sortedVoters = \call_user_func_array('array_merge', $voters);
46+
$sortedVoters = array_merge(...$voters);
4747

4848
$definition->replaceArgument(0, new IteratorArgument($sortedVoters));
4949
}

0 commit comments

Comments
 (0)