@@ -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); |
@@ -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 | |
@@ -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 | |
@@ -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 | |
@@ -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; |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * @param string|DataType $type The type of field. This can either be "long", "float" or |
| 23 | 23 | * "double" |
| 24 | 24 | */ |
| 25 | - public function __construct(string $metricName, string $outputName = '', string|DataType $type = DataType::LONG) |
|
| 25 | + public function __construct(string $metricName, string $outputName = '', string | DataType $type = DataType::LONG) |
|
| 26 | 26 | { |
| 27 | 27 | if (is_string($type)) { |
| 28 | 28 | $type = DataType::from(strtolower($type)); |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | * @param string|DataType $type The type of field. This can either be "long", "float", "double" or "string" |
| 16 | 16 | * |
| 17 | 17 | */ |
| 18 | - public function __construct(string $metricName, string $outputName = '', string|DataType $type = DataType::LONG) |
|
| 18 | + public function __construct(string $metricName, string $outputName = '', string | DataType $type = DataType::LONG) |
|
| 19 | 19 | { |
| 20 | 20 | $this->type = is_string($type) ? DataType::from(strtolower($type)) : $type; |
| 21 | 21 | $this->metricName = $metricName; |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | * |
| 30 | 30 | * @return self |
| 31 | 31 | */ |
| 32 | - public function from(DataSourceInterface|string $dataSource): self |
|
| 32 | + public function from(DataSourceInterface | string $dataSource): self |
|
| 33 | 33 | { |
| 34 | 34 | return $this->dataSource($dataSource); |
| 35 | 35 | } |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | * |
| 42 | 42 | * @return self |
| 43 | 43 | */ |
| 44 | - public function dataSource(DataSourceInterface|string $dataSource): self |
|
| 44 | + public function dataSource(DataSourceInterface | string $dataSource): self |
|
| 45 | 45 | { |
| 46 | 46 | if (is_string($dataSource)) { |
| 47 | 47 | $this->dataSource = new TableDataSource($dataSource); |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | * |
| 61 | 61 | * @return self |
| 62 | 62 | */ |
| 63 | - public function join(DataSourceInterface|Closure|string $dataSourceOrClosure, string $as, string $condition, string|JoinType $joinType = JoinType::INNER): self |
|
| 63 | + public function join(DataSourceInterface | Closure | string $dataSourceOrClosure, string $as, string $condition, string | JoinType $joinType = JoinType::INNER): self |
|
| 64 | 64 | { |
| 65 | 65 | if ($this->dataSource instanceof TableDataSource && $this->dataSource->dataSourceName == '') { |
| 66 | 66 | throw new InvalidArgumentException('You first have to define your "from" dataSource before you can join!'); |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | string $lookupName, |
| 99 | 99 | string $as, |
| 100 | 100 | string $condition, |
| 101 | - string|JoinType $joinType = JoinType::INNER |
|
| 101 | + string | JoinType $joinType = JoinType::INNER |
|
| 102 | 102 | ): self { |
| 103 | 103 | $lookupDataSource = new LookupDataSource($lookupName); |
| 104 | 104 | |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | * |
| 113 | 113 | * @return self |
| 114 | 114 | */ |
| 115 | - public function leftJoin(DataSourceInterface|Closure|string $dataSourceOrClosure, string $as, string $condition): self |
|
| 115 | + public function leftJoin(DataSourceInterface | Closure | string $dataSourceOrClosure, string $as, string $condition): self |
|
| 116 | 116 | { |
| 117 | 117 | return $this->join($dataSourceOrClosure, $as, $condition, JoinType::LEFT); |
| 118 | 118 | } |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | * |
| 125 | 125 | * @return self |
| 126 | 126 | */ |
| 127 | - public function innerJoin(DataSourceInterface|Closure|string $dataSourceOrClosure, string $as, string $condition): self |
|
| 127 | + public function innerJoin(DataSourceInterface | Closure | string $dataSourceOrClosure, string $as, string $condition): self |
|
| 128 | 128 | { |
| 129 | 129 | return $this->join($dataSourceOrClosure, $as, $condition); |
| 130 | 130 | } |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | * @return $this |
| 161 | 161 | * @see https://druid.apache.org/docs/latest/querying/datasource.html#union |
| 162 | 162 | */ |
| 163 | - public function union(array|string $dataSources, bool $append = true): self |
|
| 163 | + public function union(array | string $dataSources, bool $append = true): self |
|
| 164 | 164 | { |
| 165 | 165 | $dataSources = (array)$dataSources; |
| 166 | 166 | |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | * @return DataSourceInterface |
| 184 | 184 | * @throws InvalidArgumentException |
| 185 | 185 | */ |
| 186 | - protected function getDataSource(DataSourceInterface|Closure|string $dataSourceOrClosure): DataSourceInterface |
|
| 186 | + protected function getDataSource(DataSourceInterface | Closure | string $dataSourceOrClosure): DataSourceInterface |
|
| 187 | 187 | { |
| 188 | 188 | if ($dataSourceOrClosure instanceof DataSourceInterface) { |
| 189 | 189 | return $dataSourceOrClosure; |
@@ -12,5 +12,5 @@ |
||
| 12 | 12 | { |
| 13 | 13 | case SORTED_ARRAY = 'SORTED_ARRAY'; |
| 14 | 14 | case SORTED_SET = 'SORTED_SET'; |
| 15 | - case ARRAY = 'ARRAY'; |
|
| 15 | + case array = 'ARRAY'; |
|
| 16 | 16 | } |
| 17 | 17 | \ No newline at end of file |