| Total Complexity | 2 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 6 | class QuantilePostAggregator implements PostAggregatorInterface |
||
| 7 | { |
||
| 8 | protected string $outputName; |
||
| 9 | |||
| 10 | protected PostAggregatorInterface $dimension; |
||
| 11 | |||
| 12 | protected float $fraction; |
||
| 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 $fraction fractional position in the hypothetical sorted stream, number from 0 |
||
| 21 | * to 1 inclusive |
||
| 22 | */ |
||
| 23 | 1 | public function __construct(PostAggregatorInterface $dimension, string $outputName, float $fraction) |
|
| 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 | } |