@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | * |
117 | 117 | * @return $this |
118 | 118 | */ |
119 | - public function quantile(string $as, Closure|string $fieldOrClosure, float $fraction): self |
|
119 | + public function quantile(string $as, Closure | string $fieldOrClosure, float $fraction): self |
|
120 | 120 | { |
121 | 121 | $fields = $this->buildFields([$fieldOrClosure]); |
122 | 122 | if ($fields->count() != 1 || !$fields[0]) { |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | * |
152 | 152 | * @return $this |
153 | 153 | */ |
154 | - public function quantiles(string $as, Closure|string $fieldOrClosure, array $fractions): self |
|
154 | + public function quantiles(string $as, Closure | string $fieldOrClosure, array $fractions): self |
|
155 | 155 | { |
156 | 156 | $fields = $this->buildFields([$fieldOrClosure]); |
157 | 157 | if ($fields->count() != 1 || !$fields[0]) { |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | * |
191 | 191 | * @return $this |
192 | 192 | */ |
193 | - public function histogram(string $as, Closure|string $fieldOrClosure, ?array $splitPoints = null, ?int $numBins = null): self |
|
193 | + public function histogram(string $as, Closure | string $fieldOrClosure, ?array $splitPoints = null, ?int $numBins = null): self |
|
194 | 194 | { |
195 | 195 | $fields = $this->buildFields([$fieldOrClosure]); |
196 | 196 | if ($fields->count() != 1 || !$fields[0]) { |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | * |
227 | 227 | * @return $this |
228 | 228 | */ |
229 | - public function rank(string $as, Closure|string $fieldOrClosure, float|int $value): self |
|
229 | + public function rank(string $as, Closure | string $fieldOrClosure, float | int $value): self |
|
230 | 230 | { |
231 | 231 | $fields = $this->buildFields([$fieldOrClosure]); |
232 | 232 | if ($fields->count() != 1 || !$fields[0]) { |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | * |
264 | 264 | * @return $this |
265 | 265 | */ |
266 | - public function cdf(string $as, Closure|string $fieldOrClosure, array $splitPoints): self |
|
266 | + public function cdf(string $as, Closure | string $fieldOrClosure, array $splitPoints): self |
|
267 | 267 | { |
268 | 268 | $fields = $this->buildFields([$fieldOrClosure]); |
269 | 269 | if ($fields->count() != 1 || !$fields[0]) { |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | * |
297 | 297 | * @return $this |
298 | 298 | */ |
299 | - public function sketchSummary(string $as, Closure|string $fieldOrClosure): self |
|
299 | + public function sketchSummary(string $as, Closure | string $fieldOrClosure): self |
|
300 | 300 | { |
301 | 301 | $fields = $this->buildFields([$fieldOrClosure]); |
302 | 302 | if ($fields->count() != 1 || !$fields[0]) { |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | * |
447 | 447 | * @return $this |
448 | 448 | */ |
449 | - public function constant(float|int $numericValue, string $as): self |
|
449 | + public function constant(float | int $numericValue, string $as): self |
|
450 | 450 | { |
451 | 451 | $this->postAggregations[] = new ConstantPostAggregator($as, $numericValue); |
452 | 452 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | * |
18 | 18 | * @return $this |
19 | 19 | */ |
20 | - public function queryGranularity(string|Granularity $queryGranularity): self |
|
20 | + public function queryGranularity(string | Granularity $queryGranularity): self |
|
21 | 21 | { |
22 | 22 | $this->queryGranularity = is_string($queryGranularity) ? Granularity::from(strtolower($queryGranularity)) : $queryGranularity; |
23 | 23 |
@@ -35,9 +35,9 @@ discard block |
||
35 | 35 | * @return $this |
36 | 36 | */ |
37 | 37 | public function having( |
38 | - Closure|string|HavingFilterInterface|FilterInterface $havingOrMetricOrClosure, |
|
39 | - float|string $operator = null, |
|
40 | - float|string|bool $value = null, |
|
38 | + Closure | string | HavingFilterInterface | FilterInterface $havingOrMetricOrClosure, |
|
39 | + float | string $operator = null, |
|
40 | + float | string | bool $value = null, |
|
41 | 41 | string $boolean = 'and' |
42 | 42 | ): self { |
43 | 43 | $having = null; |
@@ -109,9 +109,9 @@ discard block |
||
109 | 109 | * @return $this |
110 | 110 | */ |
111 | 111 | public function orHaving( |
112 | - Closure|HavingFilterInterface|string $havingOrMetricOrClosure, |
|
113 | - float|string $operator = null, |
|
114 | - float|string $value = null |
|
112 | + Closure | HavingFilterInterface | string $havingOrMetricOrClosure, |
|
113 | + float | string $operator = null, |
|
114 | + float | string $value = null |
|
115 | 115 | ): self { |
116 | 116 | return $this->having($havingOrMetricOrClosure, $operator, $value, 'or'); |
117 | 117 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | * |
18 | 18 | * @return $this |
19 | 19 | */ |
20 | - public function segmentGranularity(string|Granularity $segmentGranularity): self |
|
20 | + public function segmentGranularity(string | Granularity $segmentGranularity): self |
|
21 | 21 | { |
22 | 22 | $this->segmentGranularity = is_string($segmentGranularity) ? Granularity::from(strtolower($segmentGranularity)) : $segmentGranularity; |
23 | 23 |
@@ -64,9 +64,9 @@ discard block |
||
64 | 64 | * @return $this |
65 | 65 | */ |
66 | 66 | public function where( |
67 | - Closure|string|FilterInterface $filterOrDimensionOrClosure, |
|
68 | - int|string $operator = null, |
|
69 | - array|int|string|float|bool $value = null, |
|
67 | + Closure | string | FilterInterface $filterOrDimensionOrClosure, |
|
68 | + int | string $operator = null, |
|
69 | + array | int | string | float | bool $value = null, |
|
70 | 70 | Closure $extraction = null, |
71 | 71 | string $boolean = 'and' |
72 | 72 | ): self { |
@@ -218,9 +218,9 @@ discard block |
||
218 | 218 | * @see \Level23\Druid\Concerns\HasFilter::where() |
219 | 219 | */ |
220 | 220 | public function orWhere( |
221 | - string|FilterInterface $filterOrDimension, |
|
221 | + string | FilterInterface $filterOrDimension, |
|
222 | 222 | string $operator = null, |
223 | - array|int|string $value = null, |
|
223 | + array | int | string $value = null, |
|
224 | 224 | Closure $extraction = null |
225 | 225 | ): self { |
226 | 226 | return $this->where($filterOrDimension, $operator, $value, $extraction, 'or'); |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | * |
326 | 326 | * @return $this |
327 | 327 | */ |
328 | - public function whereColumn(Closure|string $dimensionA, Closure|string $dimensionB, string $boolean = 'and'): self |
|
328 | + public function whereColumn(Closure | string $dimensionA, Closure | string $dimensionB, string $boolean = 'and'): self |
|
329 | 329 | { |
330 | 330 | $filter = new ColumnComparisonFilter( |
331 | 331 | $this->columnCompareDimension($dimensionA), |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | * |
357 | 357 | * @return $this |
358 | 358 | */ |
359 | - public function orWhereColumn(Closure|string $dimensionA, Closure|string $dimensionB): self |
|
359 | + public function orWhereColumn(Closure | string $dimensionA, Closure | string $dimensionB): self |
|
360 | 360 | { |
361 | 361 | return $this->whereColumn($dimensionA, $dimensionB, 'or'); |
362 | 362 | } |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | * |
383 | 383 | * @return $this |
384 | 384 | */ |
385 | - public function orWhereNotColumn(Closure|string $dimensionA, Closure|string $dimensionB): self |
|
385 | + public function orWhereNotColumn(Closure | string $dimensionA, Closure | string $dimensionB): self |
|
386 | 386 | { |
387 | 387 | return $this->whereNot(function (FilterBuilder $builder) use ($dimensionA, $dimensionB) { |
388 | 388 | $builder->whereColumn($dimensionA, $dimensionB); |
@@ -418,10 +418,10 @@ discard block |
||
418 | 418 | */ |
419 | 419 | public function whereBetween( |
420 | 420 | string $dimension, |
421 | - int|string $minValue, |
|
422 | - int|string $maxValue, |
|
421 | + int | string $minValue, |
|
422 | + int | string $maxValue, |
|
423 | 423 | Closure $extraction = null, |
424 | - string|SortingOrder $ordering = null, |
|
424 | + string | SortingOrder $ordering = null, |
|
425 | 425 | string $boolean = 'and' |
426 | 426 | ): self { |
427 | 427 | $filter = new BetweenFilter($dimension, $minValue, $maxValue, $ordering, $this->getExtraction($extraction)); |
@@ -456,10 +456,10 @@ discard block |
||
456 | 456 | */ |
457 | 457 | public function orWhereBetween( |
458 | 458 | string $dimension, |
459 | - int|string $minValue, |
|
460 | - int|string $maxValue, |
|
459 | + int | string $minValue, |
|
460 | + int | string $maxValue, |
|
461 | 461 | Closure $extraction = null, |
462 | - string|SortingOrder $ordering = null |
|
462 | + string | SortingOrder $ordering = null |
|
463 | 463 | ): self { |
464 | 464 | return $this->whereBetween($dimension, $minValue, $maxValue, $extraction, $ordering, 'or'); |
465 | 465 | } |
@@ -764,7 +764,7 @@ discard block |
||
764 | 764 | * @return \Level23\Druid\Dimensions\DimensionInterface |
765 | 765 | * @throws InvalidArgumentException |
766 | 766 | */ |
767 | - protected function columnCompareDimension(Closure|string $dimension): DimensionInterface |
|
767 | + protected function columnCompareDimension(Closure | string $dimension): DimensionInterface |
|
768 | 768 | { |
769 | 769 | if ($dimension instanceof Closure) { |
770 | 770 | $builder = new DimensionBuilder(); |
@@ -51,7 +51,7 @@ |
||
51 | 51 | * @return $this |
52 | 52 | * @throws \Exception |
53 | 53 | */ |
54 | - public function interval(DateTimeInterface|int|string $start, DateTimeInterface|int|string $stop = null): self |
|
54 | + public function interval(DateTimeInterface | int | string $start, DateTimeInterface | int | string $stop = null): self |
|
55 | 55 | { |
56 | 56 | $this->interval = new Interval($start, $stop); |
57 | 57 |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public function lookup( |
46 | 46 | string $lookupName, |
47 | - bool|string $keepMissingValue = false, |
|
47 | + bool | string $keepMissingValue = false, |
|
48 | 48 | bool $optimize = true, |
49 | 49 | bool $injective = null |
50 | 50 | ): self { |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function inlineLookup( |
77 | 77 | array $map, |
78 | - bool|string $keepMissingValue = false, |
|
78 | + bool | string $keepMissingValue = false, |
|
79 | 79 | bool $optimize = true, |
80 | 80 | bool $injective = null |
81 | 81 | ): self { |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | * |
97 | 97 | * @return $this |
98 | 98 | */ |
99 | - public function format(string $sprintfExpression, string|NullHandling $nullHandling = NullHandling::NULL_STRING): self |
|
99 | + public function format(string $sprintfExpression, string | NullHandling $nullHandling = NullHandling::NULL_STRING): self |
|
100 | 100 | { |
101 | 101 | $this->addExtraction(new StringFormatExtraction($sprintfExpression, $nullHandling)); |
102 | 102 | |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | * |
189 | 189 | * @return $this |
190 | 190 | */ |
191 | - public function regex(string $regexp, int $groupToExtract = 1, bool|string $keepMissingValue = true): self |
|
191 | + public function regex(string $regexp, int $groupToExtract = 1, bool | string $keepMissingValue = true): self |
|
192 | 192 | { |
193 | 193 | $this->addExtraction(new RegexExtraction($regexp, $groupToExtract, $keepMissingValue)); |
194 | 194 | |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | * |
204 | 204 | * @return $this |
205 | 205 | */ |
206 | - public function searchQuery(array|string $valueOrValues, bool $caseSensitive = false): self |
|
206 | + public function searchQuery(array | string $valueOrValues, bool $caseSensitive = false): self |
|
207 | 207 | { |
208 | 208 | $this->addExtraction(new SearchQueryExtraction($valueOrValues, $caseSensitive)); |
209 | 209 | |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | */ |
242 | 242 | public function timeFormat( |
243 | 243 | string $format = null, |
244 | - string|Granularity $granularity = null, |
|
244 | + string | Granularity $granularity = null, |
|
245 | 245 | string $locale = null, |
246 | 246 | string $timeZone = null, |
247 | 247 | bool $asMilliseconds = null |
@@ -50,7 +50,7 @@ |
||
50 | 50 | * @return $this |
51 | 51 | * @throws \Exception |
52 | 52 | */ |
53 | - public function interval(DateTimeInterface|int|string $start, DateTimeInterface|int|string $stop = null): self |
|
53 | + public function interval(DateTimeInterface | int | string $start, DateTimeInterface | int | string $stop = null): self |
|
54 | 54 | { |
55 | 55 | $this->intervals[] = new Interval($start, $stop); |
56 | 56 |
@@ -14,7 +14,7 @@ |
||
14 | 14 | * @param string $outputName When not given, we will use the same name as the metric. |
15 | 15 | * @param string|DataType $type The type of field. This can either be "long", "float", "double" or "string" |
16 | 16 | */ |
17 | - public function __construct(string $metricName, string $outputName = '', string|DataType $type = DataType::LONG) |
|
17 | + public function __construct(string $metricName, string $outputName = '', string | DataType $type = DataType::LONG) |
|
18 | 18 | { |
19 | 19 | $this->type = is_string($type) ? DataType::from(strtolower($type)) : $type; |
20 | 20 | $this->metricName = $metricName; |