| 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; |
||
| 37 | public function toArray() |
||
| 38 | { |
||
| 39 | $data = [ |
||
| 40 | 'terms' => [ |
||
| 41 | 'field' => $this->getField(), |
||
| 42 | ], |
||
| 43 | ]; |
||
| 44 | |||
| 45 | if (!empty($this->getMinDocCount())) { |
||
| 46 | $data['terms']['min_doc_count'] = $this->getMinDocCount(); |
||
| 47 | } |
||
| 48 | |||
| 49 | return $data; |
||
| 50 | } |
||
| 52 |