Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php namespace Nord\Lumen\Elasticsearch\Search\Aggregation\Bucket; |
||
38 | public function toArray() |
||
39 | { |
||
40 | $data = [ |
||
41 | 'terms' => [ |
||
42 | 'field' => $this->getField(), |
||
43 | ], |
||
44 | ]; |
||
45 | |||
46 | if (!empty($this->getMinDocCount())) { |
||
47 | $data['terms']['min_doc_count'] = $this->getMinDocCount(); |
||
48 | } |
||
49 | |||
50 | return $data; |
||
51 | } |
||
53 |