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 |
||
38 | 2 | public function parseConfigurationFile(?string $file = null): array |
|
39 | { |
||
40 | 2 | $fileName = $file === null ? $this->mainConfFile : $this->confLocation . $file . '.json'; |
|
41 | 2 | $fileContents = file_get_contents($fileName); |
|
42 | |||
43 | 2 | return !empty($fileContents) ? json_decode($fileContents, true, 512, JSON_THROW_ON_ERROR) : []; |
|
44 | } |
||
46 |