Total Complexity | 9 |
Total Lines | 68 |
Duplicated Lines | 0 % |
Coverage | 62.5% |
Changes | 0 |
1 | <?php |
||
5 | class ConditionalFormatValueObject |
||
6 | { |
||
7 | private string $type; |
||
8 | |||
9 | private null|float|int|string $value; |
||
10 | |||
11 | private ?string $cellFormula; |
||
12 | |||
13 | /** |
||
14 | * For icon sets, determines whether this threshold value uses the greater |
||
15 | * than or equal to operator. False indicates 'greater than' is used instead |
||
16 | * of 'greater than or equal to'. |
||
17 | */ |
||
18 | private ?bool $greaterThanOrEqual = null; |
||
19 | |||
20 | 36 | public function __construct(string $type, null|float|int|string $value = null, ?string $cellFormula = null) |
|
21 | { |
||
22 | 36 | $this->type = $type; |
|
23 | 36 | $this->value = $value; |
|
24 | 36 | $this->cellFormula = $cellFormula; |
|
25 | } |
||
26 | |||
27 | 35 | public function getType(): string |
|
28 | { |
||
29 | 35 | return $this->type; |
|
30 | } |
||
31 | |||
32 | public function setType(string $type): self |
||
33 | { |
||
34 | $this->type = $type; |
||
35 | |||
36 | return $this; |
||
37 | } |
||
38 | |||
39 | 35 | public function getValue(): null|float|int|string |
|
40 | { |
||
41 | 35 | return $this->value; |
|
42 | } |
||
43 | |||
44 | public function setValue(null|float|int|string $value): self |
||
45 | { |
||
46 | $this->value = $value; |
||
47 | |||
48 | return $this; |
||
49 | } |
||
50 | |||
51 | 7 | public function getCellFormula(): ?string |
|
52 | { |
||
53 | 7 | return $this->cellFormula; |
|
54 | } |
||
55 | |||
56 | public function setCellFormula(?string $cellFormula): self |
||
57 | { |
||
58 | $this->cellFormula = $cellFormula; |
||
59 | |||
60 | return $this; |
||
61 | } |
||
62 | |||
63 | 26 | public function getGreaterThanOrEqual(): ?bool |
|
64 | { |
||
65 | 26 | return $this->greaterThanOrEqual; |
|
66 | } |
||
67 | |||
68 | 1 | public function setGreaterThanOrEqual(?bool $greaterThanOrEqual): self |
|
73 | } |
||
74 | } |
||
75 |