@@ -26,14 +26,18 @@ |
||
| 26 | 26 | { |
| 27 | 27 | $runner = Runner::getInstance(); |
| 28 | 28 | |
| 29 | - if (!$runner->fileExists(self::INI_FILE)) return []; |
|
| 29 | + if (!$runner->fileExists(self::INI_FILE)) { |
|
| 30 | + return []; |
|
| 31 | + } |
|
| 30 | 32 | |
| 31 | 33 | $config = $runner->getFileContents(self::INI_FILE, true); |
| 32 | 34 | |
| 33 | 35 | $configArray = []; |
| 34 | 36 | |
| 35 | 37 | foreach ($config as $line) { |
| 36 | - if (str_starts_with($line, '[')) continue; |
|
| 38 | + if (str_starts_with($line, '[')) { |
|
| 39 | + continue; |
|
| 40 | + } |
|
| 37 | 41 | $element = explode('=', $line); |
| 38 | 42 | $configArray[$element[0]] = trim($element[1]); |
| 39 | 43 | } |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | return explode("\n", trim($output)); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | - public function getFileContents(string $path, bool $asArray = false): string|false|array |
|
| 62 | + public function getFileContents(string $path, bool $asArray = false): string | false | array |
|
| 63 | 63 | { |
| 64 | 64 | if ($asArray) { |
| 65 | 65 | return file($path); |