Passed
Pull Request — master (#63)
by Teye
14:30 queued 09:12
created
src/Concerns/HasHaving.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Concerns/HasSegmentGranularity.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Concerns/HasInterval.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Concerns/HasIntervals.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Aggregations/FirstAggregator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Aggregations/MethodAggregator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
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));
Please login to merge, or discard this patch.
src/Aggregations/AnyAggregator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
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)) {
Please login to merge, or discard this patch.
src/Aggregations/LastAggregator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Concerns/HasDataSource.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.