Conditions | 2 |
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->getScript()) { |
||
67 | throw new \LogicException( |
||
68 | sprintf( |
||
69 | '`%s` aggregation must have script set.', |
||
70 | $this->getName() |
||
71 | ) |
||
72 | ); |
||
73 | } |
||
74 | |||
75 | $out = [ |
||
76 | 'buckets_path' => $this->getBucketsPath(), |
||
77 | 'script' => $this->getScript(), |
||
78 | ]; |
||
79 | |||
80 | return $out; |
||
81 | } |
||
82 | } |
||
83 |