| Conditions | 7 |
| Paths | 5 |
| Total Lines | 25 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 7.0178 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 10 | 3 | public function process(array &$symfonyService): array |
|
| 11 | { |
||
| 12 | 3 | $invokables = []; |
|
| 13 | |||
| 14 | 3 | foreach ($symfonyService as $name => $service) { |
|
| 15 | 3 | if (is_array($service) && array_key_exists('factory', $service)) { |
|
| 16 | continue; |
||
| 17 | } |
||
| 18 | |||
| 19 | 3 | if (empty($service)) { |
|
| 20 | 1 | $invokables[$name] = $name; |
|
| 21 | 1 | unset($symfonyService[$name]); |
|
| 22 | 1 | continue; |
|
| 23 | } |
||
| 24 | |||
| 25 | 3 | if (empty($service['arguments']) && isset($service['class'])) { |
|
| 26 | 2 | $invokables[$name] = $service['class']; |
|
| 27 | 2 | unset($symfonyService[$name]); |
|
| 28 | 2 | continue; |
|
| 29 | } |
||
| 30 | } |
||
| 31 | |||
| 32 | return [ |
||
| 33 | 'dependencies' => [ |
||
| 34 | 3 | 'services' => $invokables, |
|
| 35 | ], |
||
| 39 |