| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 47 | public function parseError($message) |
||
| 48 | { |
||
| 49 | $pattern = '/^Parse error:\s*(?:\w+ error,\s*)?(?<error>.+?)\s+in\s+.+?\s*line\s+(?<line>\d+)/'; |
||
| 50 | |||
| 51 | preg_match($pattern, $message, $match); |
||
| 52 | |||
| 53 | $match = array_merge(['error' => 'Unknown', 'line' => 0], $match); |
||
| 54 | |||
| 55 | return [ |
||
| 56 | 'error' => $match['error'], |
||
| 57 | 'line' => $match['line'], |
||
| 58 | ]; |
||
| 59 | } |
||
| 60 | } |
||
| 61 |