@@ -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 | |
@@ -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 | |
@@ -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; |
@@ -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)); |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | public function __construct( |
| 24 | 24 | string $metricName, |
| 25 | 25 | string $outputName = '', |
| 26 | - string|DataType $type = DataType::LONG, |
|
| 26 | + string | DataType $type = DataType::LONG, |
|
| 27 | 27 | int $maxStringBytes = null |
| 28 | 28 | ) { |
| 29 | 29 | if (is_string($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; |