Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function parseLines(): array |
||
21 | { |
||
22 | while (($line = fgets($this->file)) !== false) { |
||
|
|||
23 | $matches = []; |
||
24 | $pattern = "/^(?<filename>[^:]+):(?<lineNo>[0-9]+)\. (?<message>.+)/"; |
||
25 | if (preg_match($pattern, $line, $matches)) { |
||
26 | $this->invalidLines |
||
27 | [$matches['filename']] |
||
28 | [$matches['lineNo']][] = $matches['message']; |
||
29 | } |
||
30 | } |
||
31 | |||
32 | return array_keys($this->invalidLines); |
||
33 | } |
||
64 |