Total Complexity | 8 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 94.12% |
Changes | 0 |
1 | <?php |
||
8 | final class Value |
||
9 | { |
||
10 | private $filter; |
||
11 | |||
12 | 18 | private function __construct($filter) { |
|
14 | 18 | } |
|
15 | |||
16 | 2 | public function getFilter() |
|
17 | { |
||
18 | 2 | if ($this->camesFromAdditionalFilters()) { |
|
19 | return $this->filter[$this->getOperator()][0]; |
||
20 | } |
||
21 | |||
22 | 2 | return $this->filter; |
|
23 | } |
||
24 | |||
25 | 1 | public function getValues() |
|
26 | { |
||
27 | 1 | return $this->filter[$this->getOperator()]; |
|
28 | } |
||
29 | |||
30 | 2 | public function getOperator() |
|
33 | } |
||
34 | |||
35 | 18 | public static function fromFilter($filter) |
|
38 | } |
||
39 | |||
40 | 4 | public function camesFromQueryString() |
|
41 | { |
||
42 | 4 | return is_string($this->filter); |
|
43 | } |
||
44 | |||
45 | 2 | public function camesFromAdditionalFilters() |
|
48 | } |
||
49 | } |
||
50 |