Total Complexity | 5 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class SingleVariable |
||
12 | { |
||
13 | protected Params $params; |
||
14 | protected string $variableValue = ''; |
||
15 | protected string $variableName = 'variable'; |
||
16 | |||
17 | 6 | public function __construct(Params $params) |
|
18 | { |
||
19 | 6 | $this->params = $params; |
|
20 | 6 | } |
|
21 | |||
22 | 6 | public function setVariableName(string $name): self |
|
26 | } |
||
27 | |||
28 | 1 | public function getVariableName(): string |
|
29 | { |
||
30 | 1 | return $this->variableName; |
|
31 | } |
||
32 | |||
33 | 6 | public function setVariableValue(string $value): self |
|
34 | { |
||
35 | 6 | $this->params->offsetSet($this->variableName, $value); |
|
36 | 6 | return $this; |
|
37 | } |
||
38 | |||
39 | 5 | public function getVariableValue(): string |
|
42 | } |
||
43 | } |
||
44 |