Total Complexity | 4 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
12 | final class Command |
||
13 | { |
||
14 | private string $value; |
||
15 | |||
16 | 21 | public function __construct(string $value) |
|
17 | { |
||
18 | 21 | if ($value === '') { |
|
19 | 3 | throw new EmptyCommandNotAllowed; |
|
20 | } |
||
21 | |||
22 | 18 | $this->value = $value; |
|
23 | 18 | } |
|
24 | |||
25 | 3 | public function matches(RegExp $pattern): bool |
|
28 | } |
||
29 | |||
30 | 3 | public function toString(): string |
|
35 |