| Conditions | 4 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 40 | public function add($line) |
||
| 41 | { |
||
| 42 | $array = preg_split('/\s+/', $line, 2); |
||
| 43 | $result = [ |
||
| 44 | 'rate' => $this->draftParseRate($array[0]), |
||
| 45 | ]; |
||
| 46 | if ($result['rate'] === false) { |
||
| 47 | return false; |
||
| 48 | } elseif ( |
||
| 49 | !empty($array[1]) && |
||
| 50 | ($times = $this->draftParseTime($array[1])) !== false |
||
| 51 | ) { |
||
| 52 | $result = array_merge($result, $times); |
||
| 53 | } |
||
| 54 | $this->array[] = $result; |
||
| 55 | return true; |
||
| 56 | } |
||
| 57 | |||
| 89 |