Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.032 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
40 | 10 | public function getComposerJsonContentAsArray(): array |
|
41 | { |
||
42 | 10 | $filename = $this->getAppRootDir() . '/composer.json'; |
|
43 | 10 | if (!file_exists($filename)) { |
|
44 | throw new LogicException("composer.json file not found but it is required. Not found in '{$filename}'"); |
||
45 | } |
||
46 | |||
47 | 10 | return (array)json_decode((string)file_get_contents($filename), true, 512, JSON_THROW_ON_ERROR); |
|
48 | } |
||
55 |