Total Complexity | 4 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | final class AnError implements Error |
||
10 | { |
||
11 | public function __construct( |
||
12 | private string $message, |
||
13 | private ?string $field = null, |
||
14 | private ?Rule $rule = null |
||
15 | ) { |
||
16 | } |
||
17 | |||
18 | /** @inheritDoc */ |
||
19 | public function message(): string |
||
20 | { |
||
21 | return $this->message; |
||
22 | } |
||
23 | |||
24 | /** @inheritDoc */ |
||
25 | public function field(): ?string |
||
26 | { |
||
27 | return $this->field; |
||
28 | } |
||
29 | |||
30 | /** @inheritDoc */ |
||
31 | public function rule(): ?Rule |
||
34 | } |
||
35 | } |
||
36 |