| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | public static function convert(array $config): BusBuilders |
||
| 9 | { |
||
| 10 | $defaultInflector = $config['method_inflector'] ?? 'tactician.handler.method_name_inflector.handle'; |
||
| 11 | |||
| 12 | $builders = []; |
||
| 13 | foreach ($config['commandbus'] as $busId => $busConfig) { |
||
| 14 | $builders[] = new BusBuilder( |
||
| 15 | $busId, |
||
| 16 | $busConfig['method_inflector'] ?? $defaultInflector, |
||
| 17 | $busConfig['middleware'] |
||
| 18 | ); |
||
| 19 | } |
||
| 20 | |||
| 21 | return new BusBuilders($builders, $config['default_bus'] ?? 'default'); |
||
| 22 | } |
||
| 23 | } |