| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 13 | 
| Code Lines | 8 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 9 | 
| CRAP Score | 2 | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 11 | 5 | public function parse(string $dependencyOutput): array | |
| 12 |     { | ||
| 13 | 5 | $dependencyOutput = json_decode($dependencyOutput, true); | |
| 14 | |||
| 15 | 5 | $parsed = []; | |
| 16 | 5 |         foreach ($dependencyOutput['dependencies'] as $name => $info) { | |
| 17 | 5 | $parsed[] = (new Dependency) | |
| 18 | 5 | ->setName($name) | |
| 19 | 5 | ->setVersion($info['version']) | |
| 20 | 5 | ->setLicenses($info['license']); | |
| 21 | } | ||
| 22 | |||
| 23 | 5 | return $parsed; | |
| 24 | } | ||
| 26 |