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