| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 16 | 1 | public function __invoke( |
|
| 17 | ContainerInterface $container, |
||
| 18 | string $contextName = ConfigProvider::DEFAULT_CONTEXT |
||
| 19 | ): QueueConsumerInterface { |
||
| 20 | 1 | $contextConfig = ConfigProvider::getContextConfig($contextName, $container->get(ConfigProvider::CONFIG_KEY)); |
|
| 21 | |||
| 22 | 1 | $extensions = []; |
|
| 23 | 1 | foreach ($contextConfig['extensions'] ?? [] as $extension) { |
|
| 24 | 1 | $extensions[] = $container->get($extension); |
|
| 25 | } |
||
| 26 | |||
| 27 | 1 | return new QueueConsumer( |
|
| 28 | 1 | $container->get($contextConfig[ConfigProvider::CONTEXT_SERVICE_KEY]), |
|
| 29 | 1 | new ChainExtension($extensions), |
|
| 30 | 1 | [], |
|
| 31 | 1 | $container->get(LoggerInterface::class) |
|
| 32 | ); |
||
| 35 |