| Conditions | 3 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 64 | public function getArray() |
||
| 65 | { |
||
| 66 | if (!$this->getBucketsPath() || !$this->getScript()) { |
||
| 67 | throw new \LogicException( |
||
| 68 | sprintf( |
||
| 69 | '`%s` aggregation must have buckets_path and script set.', |
||
| 70 | $this->getType() |
||
| 71 | ) |
||
| 72 | ); |
||
| 73 | } |
||
| 74 | |||
| 75 | $out = [ |
||
| 76 | 'buckets_path' => $this->getBucketsPath(), |
||
| 77 | 'script' => $this->getScript(), |
||
| 78 | ]; |
||
| 79 | |||
| 80 | return $out; |
||
| 81 | } |
||
| 82 | } |
||
| 83 |