Total Complexity | 5 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
6 | trait MaybeBelongsToField |
||
7 | { |
||
8 | private ?string $field = null; |
||
9 | |||
10 | public function getField(): ?string |
||
11 | { |
||
12 | return $this->field; |
||
13 | } |
||
14 | |||
15 | public function setField(?string $field): self |
||
19 | } |
||
20 | |||
21 | public function belongsToField(): bool |
||
22 | { |
||
23 | return $this->field !== null; |
||
24 | } |
||
25 | |||
26 | private function newEmptyValidationResult(): ValidationResult|ValidationResultByField |
||
29 | } |
||
30 | } |
||
31 |