Total Complexity | 6 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
6 | class Item |
||
7 | { |
||
8 | protected string $key = ''; |
||
9 | protected string $default = ''; |
||
10 | protected ?string $value = null; |
||
11 | |||
12 | 3 | public function setData(string $key, string $default = ''): self |
|
13 | { |
||
14 | 3 | $this->key = $key; |
|
15 | 3 | $this->default = $default; |
|
16 | 3 | return $this; |
|
17 | } |
||
18 | |||
19 | 3 | public function setValue(?string $value): self |
|
23 | } |
||
24 | |||
25 | /** |
||
26 | * @param bool|float|int|string|null ...$arg |
||
27 | * @return $this |
||
28 | */ |
||
29 | 1 | public function updateValue(...$arg): self |
|
33 | } |
||
34 | |||
35 | 3 | public function getKey(): string |
|
36 | { |
||
37 | 3 | return $this->key ; |
|
38 | } |
||
39 | |||
40 | 1 | public function getDefault(): string |
|
41 | { |
||
42 | 1 | return $this->default; |
|
43 | } |
||
44 | |||
45 | 3 | public function getValue(): string |
|
48 | } |
||
49 | } |
||
50 |