| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | 69 | public function process(ContainerBuilder $container) |
|
| 28 | { |
||
| 29 | 69 | $builders = BusBuildersFromConfig::convert($container->getExtensionConfig('tactician')[0]); |
|
| 30 | |||
| 31 | 69 | $routing = $this->handlerMapping->build($container, $builders->createBlankRouting()); |
|
| 32 | |||
| 33 | // Register the completed builders in our container |
||
| 34 | 66 | foreach ($builders as $builder) { |
|
| 35 | /** @var BusBuilder $builder */ |
||
| 36 | 66 | $builder->registerInContainer($container, $routing->commandToServiceMapping($builder->id())); |
|
| 37 | } |
||
| 38 | |||
| 39 | // Setup default aliases |
||
| 40 | 66 | $container->setAlias('tactician.commandbus', $builders->defaultBus()->serviceId()); |
|
| 41 | 66 | $container->setAlias('tactician.handler.locator.symfony', $builders->defaultBus()->locatorServiceId()); |
|
| 42 | 66 | $container->setAlias('tactician.middleware.command_handler', $builders->defaultBus()->commandHandlerMiddlewareId()); |
|
| 43 | 66 | } |
|
| 44 | } |
||
| 45 |