ConditionalFormatValueObject   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Test Coverage

Coverage 52.63%

Importance

Changes 0
Metric Value
wmc 7
eloc 16
c 0
b 0
f 0
dl 0
loc 49
ccs 10
cts 19
cp 0.5263
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getCellFormula() 0 3 1
A getType() 0 3 1
A setCellFormula() 0 5 1
A setType() 0 5 1
A setValue() 0 5 1
A __construct() 0 5 1
A getValue() 0 3 1
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