@@ -50,10 +50,10 @@ discard block |
||
50 | 50 | * @return self |
51 | 51 | */ |
52 | 52 | public function select( |
53 | - array|ArrayObject|string|DimensionInterface $dimension, |
|
53 | + array | ArrayObject | string | DimensionInterface $dimension, |
|
54 | 54 | string $as = '', |
55 | 55 | Closure $extraction = null, |
56 | - string|DataType $outputType = DataType::STRING |
|
56 | + string | DataType $outputType = DataType::STRING |
|
57 | 57 | ): self { |
58 | 58 | if (is_string($dimension)) { |
59 | 59 | if (!empty($extraction)) { |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | string $lookupFunction, |
97 | 97 | string $dimension, |
98 | 98 | string $as = '', |
99 | - bool|string $keepMissingValue = false |
|
99 | + bool | string $keepMissingValue = false |
|
100 | 100 | ): self { |
101 | 101 | $this->addDimension(new LookupDimension( |
102 | 102 | $dimension, |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | array $map, |
131 | 131 | string $dimension, |
132 | 132 | string $as = '', |
133 | - bool|string $keepMissingValue = false, |
|
133 | + bool | string $keepMissingValue = false, |
|
134 | 134 | bool $isOneToOne = false |
135 | 135 | ): self { |
136 | 136 | $this->addDimension(new LookupDimension( |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | string $dimension, |
163 | 163 | array $values, |
164 | 164 | string $as = '', |
165 | - string|DataType $outputType = DataType::STRING, |
|
165 | + string | DataType $outputType = DataType::STRING, |
|
166 | 166 | bool $isWhitelist = true |
167 | 167 | ): self { |
168 | 168 | $this->addDimension(new ListFilteredDimension( |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | string $dimension, |
197 | 197 | string $regex, |
198 | 198 | string $as = '', |
199 | - string|DataType $outputType = DataType::STRING |
|
199 | + string | DataType $outputType = DataType::STRING |
|
200 | 200 | ): self { |
201 | 201 | $this->addDimension(new RegexFilteredDimension( |
202 | 202 | new Dimension( |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | string $dimension, |
228 | 228 | string $prefix, |
229 | 229 | string $as = '', |
230 | - string|DataType $outputType = DataType::STRING |
|
230 | + string | DataType $outputType = DataType::STRING |
|
231 | 231 | ): self { |
232 | 232 | $this->addDimension(new PrefixFilteredDimension( |
233 | 233 | new Dimension( |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | * |
247 | 247 | * @param ArrayObject<int|string,string>|string|DimensionInterface|array<int,string> $dimension |
248 | 248 | */ |
249 | - protected function addDimension(array|ArrayObject|string|DimensionInterface $dimension): void |
|
249 | + protected function addDimension(array | ArrayObject | string | DimensionInterface $dimension): void |
|
250 | 250 | { |
251 | 251 | if ($dimension instanceof DimensionInterface) { |
252 | 252 | $this->dimensions[] = $dimension; |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function orderBy( |
68 | 68 | string $dimensionOrMetric, |
69 | - string|OrderByDirection $direction = OrderByDirection::ASC, |
|
70 | - string|SortingOrder $sortingOrder = SortingOrder::LEXICOGRAPHIC |
|
69 | + string | OrderByDirection $direction = OrderByDirection::ASC, |
|
70 | + string | SortingOrder $sortingOrder = SortingOrder::LEXICOGRAPHIC |
|
71 | 71 | ): self { |
72 | 72 | $order = new OrderBy($dimensionOrMetric, $direction, $sortingOrder); |
73 | 73 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | * |
89 | 89 | * @return $this |
90 | 90 | */ |
91 | - public function orderByDirection(string|OrderByDirection $direction = OrderByDirection::DESC): self |
|
91 | + public function orderByDirection(string | OrderByDirection $direction = OrderByDirection::DESC): self |
|
92 | 92 | { |
93 | 93 | $this->direction = is_string($direction) ? OrderByDirection::make($direction) : $direction; |
94 | 94 |
@@ -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 |