ConditionalFormatValueObject::setValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
ccs 0
cts 3
cp 0
crap 2
1
<?php
2
3
namespace PhpOffice\PhpSpreadsheet\Style\ConditionalFormatting;
4
5
class ConditionalFormatValueObject
6
{
7
    private string $type;
8
9
    private null|float|int|string $value;
10
11
    private ?string $cellFormula;
12
13 9
    public function __construct(string $type, null|float|int|string $value = null, ?string $cellFormula = null)
14
    {
15 9
        $this->type = $type;
16 9
        $this->value = $value;
17 9
        $this->cellFormula = $cellFormula;
18
    }
19
20 8
    public function getType(): string
21
    {
22 8
        return $this->type;
23
    }
24
25
    public function setType(string $type): self
26
    {
27
        $this->type = $type;
28
29
        return $this;
30
    }
31
32 8
    public function getValue(): null|float|int|string
33
    {
34 8
        return $this->value;
35
    }
36
37
    public function setValue(null|float|int|string $value): self
38
    {
39
        $this->value = $value;
40
41
        return $this;
42
    }
43
44 5
    public function getCellFormula(): ?string
45
    {
46 5
        return $this->cellFormula;
47
    }
48
49
    public function setCellFormula(?string $cellFormula): self
50
    {
51
        $this->cellFormula = $cellFormula;
52
53
        return $this;
54
    }
55
}
56