| Total Complexity | 6 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Coverage | 66.67% |
| Changes | 3 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 12 | final class DoctrineLexer |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Checks if the Lexer is prior to version 2.0.0. |
||
| 16 | * |
||
| 17 | * In Lexer versions prior to 2.0.0, the lookahead property is an array, |
||
| 18 | * while in 2.0.0+ it's an object. |
||
| 19 | */ |
||
| 20 | 21 | public static function isPre200(Lexer $lexer): bool |
|
| 21 | { |
||
| 22 | // @phpstan-ignore-next-line |
||
| 23 | 21 | return \is_array($lexer->lookahead); |
|
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @return mixed|null |
||
| 28 | */ |
||
| 29 | 20 | public static function getLookaheadType(Lexer $lexer) |
|
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @return mixed|null |
||
| 42 | */ |
||
| 43 | 1 | public static function getTokenValue(Lexer $lexer) |
|
| 59 |