Total Complexity | 7 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
13 | final class Error implements Result |
||
14 | { |
||
15 | public function __construct(private string $unparsed) {} |
||
16 | |||
17 | public static function in(string $input): Result |
||
18 | { |
||
19 | return new self($input); |
||
20 | } |
||
21 | |||
22 | public function data(): string |
||
23 | { |
||
24 | return 'unexpected ' . (empty($this->unparsed) ? 'end' : mb_substr($this->unparsed, 0, 1)); |
||
25 | } |
||
26 | |||
27 | public function unparsed(): string |
||
30 | } |
||
31 | |||
32 | public function ok(): bool |
||
35 | } |
||
36 | |||
37 | public function use(): bool |
||
38 | { |
||
42 |