Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | public function analyze(\SplFileInfo $file, string $code): array |
||
23 | { |
||
24 | try { |
||
25 | parse_code($code, $this->astVersion); |
||
26 | } catch (\ParseError $e) { |
||
27 | return [ |
||
28 | new ErrorRecord( |
||
29 | 'Parse error: ' . $e->getMessage(), |
||
30 | $file->getPathname(), |
||
31 | $e->getLine() |
||
32 | ) |
||
33 | ]; |
||
34 | } |
||
35 | |||
36 | return []; |
||
37 | } |
||
44 |