Total Complexity | 2 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | final class NonEmptyLexemeException extends InvalidArgumentException implements ExceptionInterface |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * @var LexemeInterface |
||
16 | */ |
||
17 | private $lexeme; |
||
18 | |||
19 | 5 | public function __construct(LexemeInterface $lexeme, Throwable $previous = null) |
|
20 | { |
||
21 | 5 | $this->lexeme = $lexeme; |
|
22 | 5 | parent::__construct("Empty lexeme can't include non-empty one", 0, $previous); |
|
23 | 5 | } |
|
24 | |||
25 | /** |
||
26 | * @return LexemeInterface |
||
27 | * @psalm-pure |
||
28 | */ |
||
29 | 1 | public function getLexeme(): LexemeInterface |
|
32 | } |
||
33 | } |
||
34 |