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