Total Complexity | 10 |
Total Lines | 61 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | final class PureInputData implements InputDataInterface |
||
8 | { |
||
9 | /** |
||
10 | * @param string[] $validationErrors |
||
11 | * |
||
12 | * @psalm-param list<string> $validationErrors |
||
13 | */ |
||
14 | 475 | public function __construct( |
|
15 | private ?string $name = null, |
||
16 | private mixed $value = null, |
||
17 | private ?string $label = null, |
||
18 | private ?string $hint = null, |
||
19 | private ?string $placeholder = null, |
||
20 | private ?string $id = null, |
||
21 | private ?array $validationErrors = null, |
||
22 | ) { |
||
23 | 475 | } |
|
24 | |||
25 | 1 | public function getValidationRules(): mixed |
|
26 | { |
||
27 | 1 | return null; |
|
28 | } |
||
29 | |||
30 | 123 | public function getName(): ?string |
|
31 | { |
||
32 | 123 | return $this->name; |
|
33 | } |
||
34 | |||
35 | 291 | public function getValue(): mixed |
|
36 | { |
||
37 | 291 | return $this->value; |
|
38 | } |
||
39 | |||
40 | 275 | public function getLabel(): ?string |
|
41 | { |
||
42 | 275 | return $this->label; |
|
43 | } |
||
44 | |||
45 | 424 | public function getHint(): ?string |
|
46 | { |
||
47 | 424 | return $this->hint; |
|
48 | } |
||
49 | |||
50 | 146 | public function getPlaceholder(): ?string |
|
51 | { |
||
52 | 146 | return $this->placeholder; |
|
53 | } |
||
54 | |||
55 | 315 | public function getId(): ?string |
|
56 | { |
||
57 | 315 | return $this->id; |
|
58 | } |
||
59 | |||
60 | 285 | public function isValidated(): bool |
|
61 | { |
||
62 | 285 | return $this->validationErrors !== null; |
|
63 | } |
||
64 | |||
65 | 445 | public function getValidationErrors(): array |
|
68 | } |
||
69 | } |
||
70 |