| Total Complexity | 2 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class JavaScriptPostAggregator implements PostAggregatorInterface |
||
| 9 | { |
||
| 10 | protected string $outputName; |
||
| 11 | |||
| 12 | protected PostAggregationCollection $fields; |
||
| 13 | |||
| 14 | protected string $javascriptFunction; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * JavaScriptPostAggregator constructor. |
||
| 18 | * |
||
| 19 | * NOTE: JavaScript-based functionality is disabled by default. Please refer to the Druid JavaScript programming |
||
| 20 | * guide for guidelines about using Druid's JavaScript functionality, including instructions on how to enable it. |
||
| 21 | * |
||
| 22 | * @param string $outputName |
||
| 23 | * @param PostAggregationCollection $fields |
||
| 24 | * @param string $javascriptFunction |
||
| 25 | */ |
||
| 26 | 1 | public function __construct(string $outputName, PostAggregationCollection $fields, string $javascriptFunction) |
|
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Return the post aggregator as it can be used in a druid query. |
||
| 35 | * |
||
| 36 | * @return array<string,string|array<array<string,string|array<mixed>>>> |
||
| 37 | */ |
||
| 38 | 1 | public function toArray(): array |
|
| 47 | } |