| Total Complexity | 3 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace Nord\Lumen\Elasticsearch\Search\Query\TermLevel; |
||
| 8 | class TermsQuery extends AbstractQuery |
||
| 9 | { |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @var array |
||
| 13 | */ |
||
| 14 | private $values; |
||
| 15 | |||
| 16 | |||
| 17 | /** |
||
| 18 | * @inheritdoc |
||
| 19 | */ |
||
| 20 | public function toArray() |
||
| 21 | { |
||
| 22 | return [ |
||
| 23 | 'terms' => [ |
||
| 24 | $this->getField() => $this->getValues() |
||
| 25 | ] |
||
| 26 | ]; |
||
| 27 | } |
||
| 28 | |||
| 29 | |||
| 30 | /** |
||
| 31 | * @param array $values |
||
| 32 | * @return TermsQuery |
||
| 33 | */ |
||
| 34 | public function setValues($values) |
||
| 35 | { |
||
| 36 | $this->values = $values; |
||
| 37 | return $this; |
||
| 38 | } |
||
| 39 | |||
| 40 | |||
| 41 | /** |
||
| 42 | * @return array |
||
| 43 | */ |
||
| 44 | public function getValues() |
||
| 47 | } |
||
| 48 | } |
||
| 49 |