| Conditions | 4 |
| Paths | 4 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | public function collect(): array |
||
| 26 | { |
||
| 27 | $runner = Runner::getInstance(); |
||
| 28 | |||
| 29 | if (!$runner->fileExists(self::INI_FILE)) return []; |
||
| 30 | |||
| 31 | $config = $runner->getFileContents(self::INI_FILE, true); |
||
| 32 | |||
| 33 | $configArray = []; |
||
| 34 | |||
| 35 | foreach ($config as $line) { |
||
| 36 | if (str_starts_with($line, '[')) continue; |
||
| 37 | $element = explode('=', $line); |
||
| 38 | $configArray[$element[0]] = trim($element[1]); |
||
| 39 | } |
||
| 40 | |||
| 41 | return [ |
||
| 42 | 'server' => $configArray['server'], |
||
| 43 | 'user' => $configArray['user'] |
||
| 44 | ]; |
||
| 47 |