| Total Complexity | 7 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace Nord\Lumen\Elasticsearch\Search\Query\TermLevel; |
||
| 11 | class TermQuery extends AbstractQuery |
||
| 12 | { |
||
| 13 | use HasBoost; |
||
| 14 | use HasValue; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * TermQuery constructor. |
||
| 18 | * |
||
| 19 | * @param string|null $field |
||
| 20 | * @param mixed|null $value |
||
| 21 | */ |
||
| 22 | public function __construct($field = null, $value = null) |
||
| 23 | { |
||
| 24 | if ($field !== null && $value !== null) { |
||
| 25 | $this->setField($field)->setValue($value); |
||
| 26 | } |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @inheritdoc |
||
| 31 | */ |
||
| 32 | public function toArray() |
||
| 46 | } |
||
| 47 | } |
||
| 48 |