Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 7 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | * @return CommandBus |
||
18 | 4 | */ |
|
19 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
||
20 | 4 | { |
|
21 | 4 | $configMiddleware = $container->get('config')['tactician']['middleware']; |
|
22 | |||
23 | 4 | arsort($configMiddleware); |
|
24 | 1 | ||
25 | $list = []; |
||
26 | foreach (array_keys($configMiddleware) as $serviceName) { |
||
27 | 3 | /** @var Middleware $middleware */ |
|
28 | $list[] = $container->get($serviceName); |
||
29 | 3 | } |
|
30 | 3 | ||
31 | return new CommandBus($list); |
||
34 |