| Total Complexity | 4 | 
| Total Lines | 31 | 
| Duplicated Lines | 0 % | 
| Coverage | 72.72% | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 10 | class DependencyLoader implements DependencyLoaderContract | ||
| 11 | { | ||
| 12 | /** | ||
| 13 | * @var DependencyParser | ||
| 14 | */ | ||
| 15 | private $dependencyParser; | ||
| 16 | |||
| 17 | 1 | public function __construct(DependencyParser $dependencyParser) | |
| 18 |     { | ||
| 19 | 1 | $this->dependencyParser = $dependencyParser; | |
| 20 | } | ||
| 21 | |||
| 22 | 1 | public function loadDependencies(string $composer, string $project): array | |
| 23 |     { | ||
| 24 | 1 | $commandOutput = $this->runComposerLicenseCommand($composer, $project); | |
| 25 | |||
| 26 | 1 | return $this->dependencyParser->parse(join(PHP_EOL, $commandOutput)); | |
| 27 | } | ||
| 28 | |||
| 29 | 1 | private function runComposerLicenseCommand(string $composer, string $project, string $format = 'json'): array | |
| 34 | } | ||
| 35 | |||
| 36 | protected function exec(string $command) | ||
| 41 | } | ||
| 42 | } | ||
| 43 |