Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | public function process(ContainerBuilder $container): void |
||
17 | { |
||
18 | if ($container->hasDefinition(MiddlewareRegistry::class) === false) { |
||
19 | return; |
||
20 | } |
||
21 | |||
22 | $definition = $container->findDefinition(MiddlewareRegistry::class); |
||
23 | |||
24 | $found = []; |
||
25 | |||
26 | /** @var class-string<MiddlewareInterface> $middleware */ |
||
27 | foreach ($container->findTaggedServiceIds('kafkiansky.symfony.middleware') as $middleware => $_tags) { |
||
28 | $found[$middleware] = service($middleware); |
||
29 | } |
||
30 | |||
31 | $definition->replaceArgument(0, service_locator($found)); |
||
32 | } |
||
34 |