Total Complexity | 2 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | final class TokenNotMatchedException extends RuntimeException implements ExceptionInterface |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * @var int[] |
||
15 | * @psalm-var array<int,int> |
||
16 | */ |
||
17 | private $offsets; |
||
18 | |||
19 | /** |
||
20 | * @param int[] $offsets |
||
21 | * @psalm-param array<int,int> $offsets |
||
22 | * @param Throwable|null $previous |
||
23 | */ |
||
24 | 5 | public function __construct(array $offsets, Throwable $previous = null) |
|
25 | { |
||
26 | 5 | $this->offsets = $offsets; |
|
27 | 5 | parent::__construct("Token not matched", 0, $previous); |
|
28 | 5 | } |
|
29 | |||
30 | /** |
||
31 | * @return int[] |
||
32 | * @psalm-return array<int,int> |
||
33 | * @psalm-pure |
||
34 | */ |
||
35 | 1 | public function getOffsets(): array |
|
38 | } |
||
39 | } |
||
40 |