| Total Complexity | 6 |
| Total Lines | 57 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 13 | final class MatchFail implements MatchResultInterface |
||
| 14 | { |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var int[] |
||
| 18 | * @psalm-var array<int,int> |
||
| 19 | */ |
||
| 20 | private $offsets; |
||
| 21 | |||
| 22 | 10 | public function __construct(int ...$offsets) |
|
| 25 | 10 | } |
|
| 26 | |||
| 27 | /** |
||
| 28 | * @return bool |
||
| 29 | * @psalm-pure |
||
| 30 | */ |
||
| 31 | 1 | public function shouldRepeat(): bool |
|
| 32 | { |
||
| 33 | 1 | return false; |
|
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @return bool |
||
| 38 | * @psalm-pure |
||
| 39 | */ |
||
| 40 | 1 | public function hasToken(): bool |
|
| 41 | { |
||
| 42 | 1 | return false; |
|
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return TokenInterface |
||
| 47 | * @psalm-pure |
||
| 48 | */ |
||
| 49 | 1 | public function getToken(): TokenInterface |
|
| 50 | { |
||
| 51 | 1 | throw new Exception\TokenNotMatchedException($this->offsets); |
|
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @return bool |
||
| 56 | * @psalm-pure |
||
| 57 | */ |
||
| 58 | 1 | public function hasLexeme(): bool |
|
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @return LexemeInterface |
||
| 65 | * @psalm-pure |
||
| 66 | */ |
||
| 67 | 6 | public function getLexeme(): LexemeInterface |
|
| 70 | } |
||
| 71 | } |
||
| 72 |