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