@@ -56,7 +56,7 @@ |
||
| 56 | 56 | } catch (Exception $exception) { |
| 57 | 57 | echo "Something went wrong during retrieving druid data\n"; |
| 58 | 58 | echo $exception->getMessage() . "\n"; |
| 59 | - echo $exception->getTraceAsString(). "\n"; |
|
| 59 | + echo $exception->getTraceAsString() . "\n"; |
|
| 60 | 60 | if ($exception instanceof \GuzzleHttp\Exception\ClientException) { |
| 61 | 61 | echo $exception->getResponse()->getBody() . "\n"; |
| 62 | 62 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | ->select('Mountain') |
| 23 | 23 | ->select('Country') |
| 24 | 24 | ->select('Location') |
| 25 | - ->whereSpatialRadius('Location', [28,84], 0.8) |
|
| 25 | + ->whereSpatialRadius('Location', [28, 84], 0.8) |
|
| 26 | 26 | ; |
| 27 | 27 | |
| 28 | 28 | // Execute the query. |
@@ -142,7 +142,7 @@ |
||
| 142 | 142 | * |
| 143 | 143 | * @throws InvalidArgumentException |
| 144 | 144 | */ |
| 145 | - public function setGranularity(string|Granularity $granularity): void |
|
| 145 | + public function setGranularity(string | Granularity $granularity): void |
|
| 146 | 146 | { |
| 147 | 147 | $this->granularity = is_string($granularity) ? Granularity::from(strtolower($granularity)) : $granularity; |
| 148 | 148 | } |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | DimensionInterface $dimension, |
| 57 | 57 | int $threshold, |
| 58 | 58 | string $metric, |
| 59 | - string|Granularity $granularity = Granularity::ALL |
|
| 59 | + string | Granularity $granularity = Granularity::ALL |
|
| 60 | 60 | ) { |
| 61 | 61 | $this->dataSource = $dataSource; |
| 62 | 62 | $this->intervals = $intervals; |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | public function __construct( |
| 56 | 56 | DataSourceInterface $dataSource, |
| 57 | 57 | IntervalCollection $intervals, |
| 58 | - string|Granularity $granularity = Granularity::ALL |
|
| 58 | + string | Granularity $granularity = Granularity::ALL |
|
| 59 | 59 | ) { |
| 60 | 60 | $this->dataSource = $dataSource; |
| 61 | 61 | $this->intervals = $intervals; |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | * |
| 151 | 151 | * @param string|ScanQueryResultFormat $resultFormat |
| 152 | 152 | */ |
| 153 | - public function setResultFormat(string|ScanQueryResultFormat $resultFormat): void |
|
| 153 | + public function setResultFormat(string | ScanQueryResultFormat $resultFormat): void |
|
| 154 | 154 | { |
| 155 | 155 | $this->resultFormat = is_string($resultFormat) ? ScanQueryResultFormat::from(strtolower($resultFormat)) : $resultFormat; |
| 156 | 156 | } |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | * |
| 230 | 230 | * @param string|OrderByDirection $order |
| 231 | 231 | */ |
| 232 | - public function setOrder(string|OrderByDirection $order): void |
|
| 232 | + public function setOrder(string | OrderByDirection $order): void |
|
| 233 | 233 | { |
| 234 | 234 | $this->order = is_string($order) ? OrderByDirection::make($order) : $order; |
| 235 | 235 | } |
@@ -61,8 +61,8 @@ discard block |
||
| 61 | 61 | DataSourceInterface $dataSource, |
| 62 | 62 | DimensionCollection $dimensions, |
| 63 | 63 | IntervalCollection $intervals, |
| 64 | - array|AggregationCollection $aggregations = null, |
|
| 65 | - string|Granularity $granularity = 'all' |
|
| 64 | + array | AggregationCollection $aggregations = null, |
|
| 65 | + string | Granularity $granularity = 'all' |
|
| 66 | 66 | ) { |
| 67 | 67 | $this->dataSource = $dataSource; |
| 68 | 68 | $this->dimensions = $dimensions; |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | /** |
| 136 | 136 | * @param \Level23\Druid\Collections\AggregationCollection|array<AggregatorInterface> $aggregations |
| 137 | 137 | */ |
| 138 | - public function setAggregations(array|AggregationCollection $aggregations): void |
|
| 138 | + public function setAggregations(array | AggregationCollection $aggregations): void |
|
| 139 | 139 | { |
| 140 | 140 | if (is_array($aggregations)) { |
| 141 | 141 | $aggregations = new AggregationCollection(...$aggregations); |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | /** |
| 148 | 148 | * @param \Level23\Druid\Collections\PostAggregationCollection|array<PostAggregatorInterface> $postAggregations |
| 149 | 149 | */ |
| 150 | - public function setPostAggregations(PostAggregationCollection|array $postAggregations): void |
|
| 150 | + public function setPostAggregations(PostAggregationCollection | array $postAggregations): void |
|
| 151 | 151 | { |
| 152 | 152 | if (is_array($postAggregations)) { |
| 153 | 153 | $postAggregations = new PostAggregationCollection(...$postAggregations); |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | /** |
| 176 | 176 | * @param \Level23\Druid\Limits\Limit|int $limit |
| 177 | 177 | */ |
| 178 | - public function setLimit(Limit|int $limit): void |
|
| 178 | + public function setLimit(Limit | int $limit): void |
|
| 179 | 179 | { |
| 180 | 180 | if ($limit instanceof LimitInterface) { |
| 181 | 181 | $this->limit = $limit; |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | public function __construct( |
| 41 | 41 | DataSourceInterface $dataSource, |
| 42 | - string|Granularity $granularity, |
|
| 42 | + string | Granularity $granularity, |
|
| 43 | 43 | IntervalCollection $intervals, |
| 44 | 44 | SearchFilterInterface $searchFilter |
| 45 | 45 | ) { |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | /** |
| 124 | 124 | * @param string|SortingOrder $sort |
| 125 | 125 | */ |
| 126 | - public function setSort(string|SortingOrder $sort): void |
|
| 126 | + public function setSort(string | SortingOrder $sort): void |
|
| 127 | 127 | { |
| 128 | 128 | $this->sort = is_string($sort) ? SortingOrder::from(strtolower($sort)) : $sort; |
| 129 | 129 | } |
@@ -23,8 +23,8 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | public function __construct( |
| 25 | 25 | string $dimension, |
| 26 | - string|OrderByDirection $direction = OrderByDirection::ASC, |
|
| 27 | - string|SortingOrder $dimensionOrder = SortingOrder::LEXICOGRAPHIC |
|
| 26 | + string | OrderByDirection $direction = OrderByDirection::ASC, |
|
| 27 | + string | SortingOrder $dimensionOrder = SortingOrder::LEXICOGRAPHIC |
|
| 28 | 28 | ) { |
| 29 | 29 | $this->dimension = $dimension; |
| 30 | 30 | $this->direction = is_string($direction) ? OrderByDirection::make($direction) : $direction; |