Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
30 | private function __construct(array $terms = []) |
||
31 | { |
||
32 | $filterTerms = []; |
||
33 | foreach ($terms as $term => $value) { |
||
34 | if (empty($value)) { |
||
35 | continue; |
||
36 | } |
||
37 | $filterTerms[] = ['term' => [$term => $value]]; |
||
38 | } |
||
39 | |||
40 | $this->query = [ |
||
41 | 'query' => [ |
||
42 | 'bool' => [ |
||
43 | 'filter' => $filterTerms |
||
44 | ] |
||
49 |