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

ConditionalFormatValueObject   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Test Coverage

Coverage 47.06%

Importance

Changes 0
Metric Value
wmc 7
eloc 10
dl 0
loc 40
ccs 8
cts 17
cp 0.4706
rs 10
c 0
b 0
f 0

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 2 1
A getValue() 0 3 1
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