KeepStored::getValue()   A
last analyzed

Complexity

Conditions 3
Paths 4

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 3

Importance

Changes 0
Metric Value
cc 3
eloc 1
nc 4
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace LaTevaWeb\QueryUpdater\Filter;
4
5
class KeepStored extends AbstractFilter
6
{
7 1
    public function getValue()
8
    {
9 1
        return (is_null($this->value) || empty($this->value)) ? $this->getStoredValue() : $this->value;
10
    }
11
12 1
    public function setValue($value = null): void
13
    {
14 1
        $this->value = (is_null($value) || empty($value)) ? $this->getStoredValue() : $value;
15 1
    }
16
}
17