Total Complexity | 2 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
6 | class RankPostAggregator implements PostAggregatorInterface |
||
7 | { |
||
8 | protected string $outputName; |
||
9 | |||
10 | protected PostAggregatorInterface $dimension; |
||
11 | |||
12 | protected float $value; |
||
13 | |||
14 | /** |
||
15 | * QuantilePostAggregator constructor. |
||
16 | * |
||
17 | * @param PostAggregatorInterface $dimension Post aggregator that refers to a DoublesSketch (fieldAccess or |
||
18 | * another post aggregator) |
||
19 | * @param string $outputName The name as it will be used in our result. |
||
20 | * @param float $value This returns an approximation to the rank of a given value that is |
||
21 | * the fraction of the distribution less than that value. |
||
22 | */ |
||
23 | 1 | public function __construct(PostAggregatorInterface $dimension, string $outputName, float $value) |
|
28 | } |
||
29 | |||
30 | /** |
||
31 | * Return the aggregator as it can be used in a druid query. |
||
32 | * |
||
33 | * @return array<string,string|array<string,string|array<mixed>>|float> |
||
34 | */ |
||
35 | 1 | public function toArray(): array |
|
44 | } |