| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function getFileContentsAsArray(string $path): array |
||
| 18 | { |
||
| 19 | $fileContents = file_get_contents($path); |
||
| 20 | $fileContentsAsArray = json_decode($fileContents, true); |
||
| 21 | if (!is_array($fileContentsAsArray)) { |
||
| 22 | throw ConfigFileUnparsable::constructFromPath($path); |
||
| 23 | } |
||
| 24 | return $fileContentsAsArray; |
||
| 25 | } |
||
| 26 | } |
||
| 27 |