| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 40 | 12 | public function getComposerJsonContentAsArray(): array |
|
| 41 | { |
||
| 42 | 12 | $filename = $this->getAppRootDir() . '/composer.json'; |
|
| 43 | 12 | if (!file_exists($filename)) { |
|
| 44 | 2 | throw ConsoleException::composerJsonNotFound(); |
|
| 45 | } |
||
| 46 | |||
| 47 | 10 | return (array)json_decode((string)file_get_contents($filename), true, 512, JSON_THROW_ON_ERROR); |
|
| 48 | } |
||
| 55 |