Conditions | 3 |
Paths | 4 |
Total Lines | 6 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | 2 | public function parseConfigurationFile(?string $file = null): array |
|
33 | { |
||
34 | 2 | $fileName = $file === null ? $this->mainConfFile : $this->confLocation . $file . '.json'; |
|
35 | 2 | $fileContents = file_get_contents($fileName); |
|
36 | |||
37 | 2 | return !empty($fileContents) ? json_decode($fileContents, true, 512, JSON_THROW_ON_ERROR) : []; |
|
38 | } |
||
40 |