@@ -41,12 +41,12 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | public function __construct( |
| 43 | 43 | string $dimension, |
| 44 | - string|BoundOperator $operator, |
|
| 44 | + string | BoundOperator $operator, |
|
| 45 | 45 | string $value, |
| 46 | - string|SortingOrder $ordering = null, |
|
| 46 | + string | SortingOrder $ordering = null, |
|
| 47 | 47 | ?ExtractionInterface $extractionFunction = null |
| 48 | 48 | ) { |
| 49 | - if(is_string($ordering)) { |
|
| 49 | + if (is_string($ordering)) { |
|
| 50 | 50 | $ordering = SortingOrder::from(strtolower($ordering)); |
| 51 | 51 | } |
| 52 | 52 | |
@@ -43,9 +43,9 @@ |
||
| 43 | 43 | */ |
| 44 | 44 | public function __construct( |
| 45 | 45 | string $dimension, |
| 46 | - int|string $minValue, |
|
| 47 | - int|string $maxValue, |
|
| 48 | - string|SortingOrder $ordering = null, |
|
| 46 | + int | string $minValue, |
|
| 47 | + int | string $maxValue, |
|
| 48 | + string | SortingOrder $ordering = null, |
|
| 49 | 49 | ?ExtractionInterface $extractionFunction = null |
| 50 | 50 | ) { |
| 51 | 51 | if (is_string($ordering)) { |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | * |
| 37 | 37 | * @return $this |
| 38 | 38 | */ |
| 39 | - public function field(string|FlattenFieldType $flattenFieldType, string $name, string $expr = null): self |
|
| 39 | + public function field(string | FlattenFieldType $flattenFieldType, string $name, string $expr = null): self |
|
| 40 | 40 | { |
| 41 | 41 | $type = is_string($flattenFieldType) ? FlattenFieldType::from(strtolower($flattenFieldType)) : $flattenFieldType; |
| 42 | 42 | |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | * |
| 12 | 12 | * @var string[]|string |
| 13 | 13 | */ |
| 14 | - protected string|array $paths; |
|
| 14 | + protected string | array $paths; |
|
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * HdfsInputSource constructor. |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | * like * are supported in these paths. Empty files located under one of the given paths |
| 21 | 21 | * will be skipped. |
| 22 | 22 | */ |
| 23 | - public function __construct(array|string $paths) |
|
| 23 | + public function __construct(array | string $paths) |
|
| 24 | 24 | { |
| 25 | 25 | $this->paths = $paths; |
| 26 | 26 | } |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | /** |
| 16 | 16 | * @var null|string|string[] |
| 17 | 17 | */ |
| 18 | - protected string|array|null $password; |
|
| 18 | + protected string | array | null $password; |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * HttpInputSource constructor. |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | * @param string|null $username |
| 25 | 25 | * @param string|string[]|null $password |
| 26 | 26 | */ |
| 27 | - public function __construct(array $uris, ?string $username = null, array|string $password = null) |
|
| 27 | + public function __construct(array $uris, ?string $username = null, array | string $password = null) |
|
| 28 | 28 | { |
| 29 | 29 | $this->uris = $uris; |
| 30 | 30 | $this->username = $username; |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | * @return $this |
| 35 | 35 | * @see https://druid.apache.org/docs/latest/misc/math-expr.html |
| 36 | 36 | */ |
| 37 | - public function virtualColumn(string $expression, string $as, string|DataType $outputType = DataType::STRING): self |
|
| 37 | + public function virtualColumn(string $expression, string $as, string | DataType $outputType = DataType::STRING): self |
|
| 38 | 38 | { |
| 39 | 39 | $this->virtualColumns[] = new VirtualColumn($expression, $as, $outputType); |
| 40 | 40 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | * |
| 20 | 20 | * @return $this |
| 21 | 21 | */ |
| 22 | - public function tuningConfig(array|TuningConfig $tuningConfig): self |
|
| 22 | + public function tuningConfig(array | TuningConfig $tuningConfig): self |
|
| 23 | 23 | { |
| 24 | 24 | if (!$tuningConfig instanceof TuningConfig) { |
| 25 | 25 | $tuningConfig = new TuningConfig($tuningConfig); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | public function sum( |
| 58 | 58 | string $metric, |
| 59 | 59 | string $as = '', |
| 60 | - string|DataType $type = DataType::LONG, |
|
| 60 | + string | DataType $type = DataType::LONG, |
|
| 61 | 61 | Closure $filterBuilder = null |
| 62 | 62 | ): self { |
| 63 | 63 | $this->aggregations[] = $this->buildFilteredAggregation( |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | */ |
| 237 | 237 | public function cardinality( |
| 238 | 238 | string $as, |
| 239 | - array|Closure $dimensionsOrDimensionBuilder, |
|
| 239 | + array | Closure $dimensionsOrDimensionBuilder, |
|
| 240 | 240 | bool $byRow = false, |
| 241 | 241 | bool $round = false |
| 242 | 242 | ): self { |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | public function min( |
| 355 | 355 | string $metric, |
| 356 | 356 | string $as = '', |
| 357 | - string|DataType $type = DataType::LONG, |
|
| 357 | + string | DataType $type = DataType::LONG, |
|
| 358 | 358 | Closure $filterBuilder = null |
| 359 | 359 | ): self { |
| 360 | 360 | $this->aggregations[] = $this->buildFilteredAggregation( |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | public function max( |
| 425 | 425 | string $metric, |
| 426 | 426 | string $as = '', |
| 427 | - string|DataType $type = DataType::LONG, |
|
| 427 | + string | DataType $type = DataType::LONG, |
|
| 428 | 428 | Closure $filterBuilder = null |
| 429 | 429 | ): self { |
| 430 | 430 | $this->aggregations[] = $this->buildFilteredAggregation( |
@@ -499,7 +499,7 @@ discard block |
||
| 499 | 499 | public function any( |
| 500 | 500 | string $metric, |
| 501 | 501 | string $as = '', |
| 502 | - string|DataType $type = DataType::LONG, |
|
| 502 | + string | DataType $type = DataType::LONG, |
|
| 503 | 503 | int $maxStringBytes = null, |
| 504 | 504 | Closure $filterBuilder = null |
| 505 | 505 | ): self { |
@@ -609,7 +609,7 @@ discard block |
||
| 609 | 609 | public function first( |
| 610 | 610 | string $metric, |
| 611 | 611 | string $as = '', |
| 612 | - string|DataType $type = DataType::LONG, |
|
| 612 | + string | DataType $type = DataType::LONG, |
|
| 613 | 613 | Closure $filterBuilder = null |
| 614 | 614 | ): self { |
| 615 | 615 | $this->aggregations[] = $this->buildFilteredAggregation( |
@@ -706,7 +706,7 @@ discard block |
||
| 706 | 706 | public function last( |
| 707 | 707 | string $metric, |
| 708 | 708 | string $as = '', |
| 709 | - string|DataType $type = DataType::LONG, |
|
| 709 | + string | DataType $type = DataType::LONG, |
|
| 710 | 710 | Closure $filterBuilder = null |
| 711 | 711 | ): self { |
| 712 | 712 | $this->aggregations[] = $this->buildFilteredAggregation( |
@@ -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; |