Total Complexity | 12 |
Total Lines | 65 |
Duplicated Lines | 0 % |
Coverage | 92.86% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | final class PureInputData implements InputDataInterface |
||
8 | { |
||
9 | 119 | public function __construct( |
|
10 | private ?string $name = null, |
||
11 | private mixed $value = null, |
||
12 | ) { |
||
13 | 119 | } |
|
14 | |||
15 | public function getValidationRules(): array |
||
16 | { |
||
17 | return []; |
||
18 | } |
||
19 | |||
20 | 2 | public function getName(): ?string |
|
21 | { |
||
22 | 2 | return $this->name; |
|
23 | } |
||
24 | |||
25 | 2 | public function getValue(): mixed |
|
26 | { |
||
27 | 2 | return $this->value; |
|
28 | } |
||
29 | |||
30 | 108 | public function getLabel(): ?string |
|
31 | { |
||
32 | 108 | return null; |
|
33 | } |
||
34 | |||
35 | 108 | public function getHint(): ?string |
|
36 | { |
||
37 | 108 | return null; |
|
38 | } |
||
39 | |||
40 | 2 | public function getPlaceholder(): ?string |
|
41 | { |
||
42 | 2 | return null; |
|
43 | } |
||
44 | |||
45 | 8 | public function getId(): ?string |
|
46 | { |
||
47 | 8 | return null; |
|
48 | } |
||
49 | |||
50 | 2 | public function isValidated(): bool |
|
51 | { |
||
52 | 2 | return false; |
|
53 | } |
||
54 | |||
55 | 108 | public function getValidationErrors(): array |
|
58 | } |
||
59 | |||
60 | 2 | public function withName(?string $name): static |
|
61 | { |
||
62 | 2 | $new = clone $this; |
|
63 | 2 | $new->name = $name; |
|
64 | 2 | return $new; |
|
65 | } |
||
66 | |||
67 | 1 | public function withValue(mixed $value): static |
|
68 | { |
||
74 |