Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
25 | private function parseFilter(array $filter = []): string |
||
26 | { |
||
27 | $add_params = ''; |
||
28 | if (empty($filter)) { |
||
29 | return $add_params; |
||
30 | } |
||
31 | |||
32 | $filtered = []; |
||
33 | foreach ($filter as $k => $v) { |
||
34 | if (array_key_exists($k, self::FILTER)) { |
||
|
|||
35 | $filtered[$k] = $v; |
||
36 | } |
||
37 | } |
||
38 | $add_params = http_build_query($filtered); |
||
39 | return $add_params; |
||
40 | } |
||
52 |