| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public static function convert(array $config): BusBuilders |
||
| 13 | { |
||
| 14 | $defaultInflector = $config['method_inflector'] ?? self::DEFAULT_METHOD_INFLECTOR; |
||
| 15 | |||
| 16 | $builders = []; |
||
| 17 | foreach ($config['commandbus'] ?? [] as $busId => $busConfig) { |
||
| 18 | $builders[] = new BusBuilder( |
||
| 19 | $busId, |
||
| 20 | $busConfig['method_inflector'] ?? $defaultInflector, |
||
| 21 | $busConfig['middleware'] |
||
| 22 | ); |
||
| 23 | } |
||
| 24 | |||
| 25 | return new BusBuilders($builders, $config['default_bus'] ?? self::DEFAULT_BUS_ID); |
||
| 26 | } |
||
| 27 | } |
||
| 28 |