Conditions | 3 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 8 |
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 | '`bucket_script` aggregation must have buckets_path and script set.' |
||
69 | ); |
||
70 | } |
||
71 | |||
72 | $out = [ |
||
73 | 'buckets_path' => $this->getBucketsPath(), |
||
74 | 'script' => $this->getScript(), |
||
75 | ]; |
||
76 | |||
77 | return $out; |
||
78 | } |
||
79 | } |
||
80 |