Failed Conditions
Pull Request — master (#3876)
by Abdul Malik
22:45 queued 13:31
created

ConditionalFormatValueObject::setValue()   A

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 5
    public function __construct(private string $type, private null|float|int|string $value = null, private ?string $cellFormula = null)
8
    {
9 5
    }
10
11 5
    public function getType(): string
12
    {
13 5
        return $this->type;
14
    }
15
16
    public function setType(string $type): self
17
    {
18
        $this->type = $type;
19
20
        return $this;
21
    }
22
23 5
    public function getValue(): null|float|int|string
24
    {
25 5
        return $this->value;
26
    }
27
28
    public function setValue(null|float|int|string $value): self
29
    {
30
        $this->value = $value;
31
32
        return $this;
33
    }
34
35 2
    public function getCellFormula(): ?string
36
    {
37 2
        return $this->cellFormula;
38
    }
39
40
    public function setCellFormula(?string $cellFormula): self
41
    {
42
        $this->cellFormula = $cellFormula;
43
44
        return $this;
45
    }
46
}
47