| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | 1 | public function __invoke(ContainerInterface $container): ContainerInterface |
|
| 14 | { |
||
| 15 | 1 | $config = $container->has('config') ? $container->get('config') : []; |
|
| 16 | 1 | $transports = $config['messenger']['transports'] ?? []; |
|
| 17 | 1 | $factories = []; |
|
| 18 | |||
| 19 | 1 | foreach ($transports as $name => $transport) { |
|
| 20 | $factories[$name] = static function () use ($name, $container): RetryStrategyInterface { |
||
| 21 | 1 | return (new RetryStrategyFactory($name))($container); |
|
| 22 | }; |
||
| 23 | } |
||
| 24 | |||
| 25 | 1 | return new ServiceManager(['factories' => $factories]); |
|
| 26 | } |
||
| 28 |