| Conditions | 4 |
| Paths | 4 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 9 |
| Ratio | 47.37 % |
| Tests | 11 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 17 | 3 | public function process(ContainerBuilder $container) |
|
| 18 | { |
||
| 19 | 3 | $ids = $container->findTaggedServiceIds('innmind_command_bus.handler'); |
|
| 20 | 3 | $services = []; |
|
| 21 | |||
| 22 | 3 | View Code Duplication | foreach ($ids as $id => $tags) { |
| 23 | 2 | foreach ($tags as $tag => $attributes) { |
|
| 24 | 2 | if (!isset($attributes['handles'])) { |
|
| 25 | 1 | throw new LogicException; |
|
| 26 | } |
||
| 27 | |||
| 28 | 1 | $services[$attributes['handles']] = $id; |
|
| 29 | } |
||
| 30 | } |
||
| 31 | |||
| 32 | $container |
||
| 33 | 2 | ->getDefinition('innmind_command_bus.default') |
|
| 34 | 2 | ->replaceArgument(1, $services); |
|
| 35 | 2 | } |
|
| 36 | } |
||
| 37 |