Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
12 | public function parse() |
||
13 | { |
||
14 | $lines = explode(Parser::COMMAND_SEPARATOR, $this->data); |
||
15 | $stats = []; |
||
16 | |||
17 | foreach ($lines as $line) { |
||
18 | preg_match('/STAT (\w+) (\w+)/', $line, $matches); |
||
19 | if (empty($matches)) { |
||
20 | break; |
||
21 | } |
||
22 | |||
23 | $stats[$matches[1]] = $matches[2]; |
||
24 | } |
||
25 | |||
26 | return $stats; |
||
27 | } |
||
29 |