Passed
Push — develop ( ab2dee...f7d7c9 )
by nguereza
11:21
created
src/Query/Where.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     /**
58 58
      * @var string|Expression
59 59
      */
60
-    protected string|Expression $column;
60
+    protected string | Expression $column;
61 61
 
62 62
     /**
63 63
      * @var string
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      * @param string $separator
95 95
      * @return $this
96 96
      */
97
-    public function init(string|Expression|Closure $column, string $separator): self
97
+    public function init(string | Expression | Closure $column, string $separator): self
98 98
     {
99 99
         if ($column instanceof Closure) {
100 100
             $column = Expression::fromClosure($column);
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      * @param bool $isColumn
111 111
      * @return WhereStatement|Select|Delete|Update
112 112
      */
113
-    public function is(mixed $value, bool $isColumn = false): WhereStatement|Select|Delete|Update
113
+    public function is(mixed $value, bool $isColumn = false): WhereStatement | Select | Delete | Update
114 114
     {
115 115
         return $this->addCondition($value, '=', $isColumn);
116 116
     }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      * @param bool $isColumn
121 121
      * @return WhereStatement|Select|Delete|Update
122 122
      */
123
-    public function eq(mixed $value, bool $isColumn = false): WhereStatement|Select|Delete|Update
123
+    public function eq(mixed $value, bool $isColumn = false): WhereStatement | Select | Delete | Update
124 124
     {
125 125
         return $this->is($value, $isColumn);
126 126
     }
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
      * @param bool $isColumn
131 131
      * @return WhereStatement|Select|Delete|Update
132 132
      */
133
-    public function isNot(mixed $value, bool $isColumn = false): WhereStatement|Select|Delete|Update
133
+    public function isNot(mixed $value, bool $isColumn = false): WhereStatement | Select | Delete | Update
134 134
     {
135 135
         return $this->addCondition($value, '!=', $isColumn);
136 136
     }
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
      * @param bool $isColumn
141 141
      * @return WhereStatement|Select|Delete|Update
142 142
      */
143
-    public function neq(mixed $value, bool $isColumn = false): WhereStatement|Select|Delete|Update
143
+    public function neq(mixed $value, bool $isColumn = false): WhereStatement | Select | Delete | Update
144 144
     {
145 145
         return $this->isNot($value, $isColumn);
146 146
     }
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      * @param bool $isColumn
151 151
      * @return WhereStatement|Select|Delete|Update
152 152
      */
153
-    public function lt(mixed $value, bool $isColumn = false): WhereStatement|Select|Delete|Update
153
+    public function lt(mixed $value, bool $isColumn = false): WhereStatement | Select | Delete | Update
154 154
     {
155 155
         return $this->addCondition($value, '<', $isColumn);
156 156
     }
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
      * @param bool $isColumn
161 161
      * @return WhereStatement|Select|Delete|Update
162 162
      */
163
-    public function gt(mixed $value, bool $isColumn = false): WhereStatement|Select|Delete|Update
163
+    public function gt(mixed $value, bool $isColumn = false): WhereStatement | Select | Delete | Update
164 164
     {
165 165
         return $this->addCondition($value, '>', $isColumn);
166 166
     }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      * @param bool $isColumn
171 171
      * @return WhereStatement|Select|Delete|Update
172 172
      */
173
-    public function lte(mixed $value, bool $isColumn = false): WhereStatement|Select|Delete|Update
173
+    public function lte(mixed $value, bool $isColumn = false): WhereStatement | Select | Delete | Update
174 174
     {
175 175
         return $this->addCondition($value, '<=', $isColumn);
176 176
     }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
      * @param bool $isColumn
181 181
      * @return WhereStatement|Select|Delete|Update
182 182
      */
183
-    public function gte(mixed $value, bool $isColumn = false): WhereStatement|Select|Delete|Update
183
+    public function gte(mixed $value, bool $isColumn = false): WhereStatement | Select | Delete | Update
184 184
     {
185 185
         return $this->addCondition($value, '>=', $isColumn);
186 186
     }
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
      * @param mixed $value2
191 191
      * @return WhereStatement|Select|Delete|Update
192 192
      */
193
-    public function between(mixed $value1, mixed $value2): WhereStatement|Select|Delete|Update
193
+    public function between(mixed $value1, mixed $value2): WhereStatement | Select | Delete | Update
194 194
     {
195 195
         return $this->addBetweenCondition($value1, $value2, false);
196 196
     }
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
      * @param mixed $value2
201 201
      * @return WhereStatement|Select|Delete|Update
202 202
      */
203
-    public function notBetween(mixed $value1, mixed $value2): WhereStatement|Select|Delete|Update
203
+    public function notBetween(mixed $value1, mixed $value2): WhereStatement | Select | Delete | Update
204 204
     {
205 205
         return $this->addBetweenCondition($value1, $value2, true);
206 206
     }
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
      * @param mixed $value
210 210
      * @return WhereStatement|Select|Delete|Update
211 211
      */
212
-    public function like(mixed $value): WhereStatement|Select|Delete|Update
212
+    public function like(mixed $value): WhereStatement | Select | Delete | Update
213 213
     {
214 214
         return $this->addLikeCondition($value, false);
215 215
     }
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
      * @param mixed $value
219 219
      * @return WhereStatement|Select|Delete|Update
220 220
      */
221
-    public function notLike(mixed $value): WhereStatement|Select|Delete|Update
221
+    public function notLike(mixed $value): WhereStatement | Select | Delete | Update
222 222
     {
223 223
         return $this->addLikeCondition($value, true);
224 224
     }
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
      * @param array<int, mixed>|Closure $value
228 228
      * @return WhereStatement
229 229
      */
230
-    public function in(array|Closure $value): WhereStatement
230
+    public function in(array | Closure $value): WhereStatement
231 231
     {
232 232
         return $this->addInCondition($value, false);
233 233
     }
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
      * @param array<int, mixed>|Closure $value
237 237
      * @return WhereStatement
238 238
      */
239
-    public function notIn(array|Closure $value): WhereStatement
239
+    public function notIn(array | Closure $value): WhereStatement
240 240
     {
241 241
         return $this->addInCondition($value, true);
242 242
     }
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
     /**
245 245
      * @return WhereStatement|Select|Delete|Update
246 246
      */
247
-    public function isNull(): WhereStatement|Select|Delete|Update
247
+    public function isNull(): WhereStatement | Select | Delete | Update
248 248
     {
249 249
         return $this->addNullCondition(false);
250 250
     }
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
     /**
253 253
      * @return WhereStatement|Select|Delete|Update
254 254
      */
255
-    public function isNotNull(): WhereStatement|Select|Delete|Update
255
+    public function isNotNull(): WhereStatement | Select | Delete | Update
256 256
     {
257 257
         return $this->addNullCondition(true);
258 258
     }
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
     /**
261 261
      * @return WhereStatement|Select|Delete|Update
262 262
      */
263
-    public function nop(): WhereStatement|Select|Delete|Update
263
+    public function nop(): WhereStatement | Select | Delete | Update
264 264
     {
265 265
         $this->queryStatement->addWhereNop($this->column, $this->separator);
266 266
 
@@ -289,9 +289,9 @@  discard block
 block discarded – undo
289 289
         mixed $value,
290 290
         string $operator,
291 291
         bool $isColumn = false
292
-    ): WhereStatement|Select|Delete|Update {
292
+    ): WhereStatement | Select | Delete | Update {
293 293
         if ($isColumn && is_string($value)) {
294
-            $value = function (Expression $expr) use ($value) {
294
+            $value = function(Expression $expr) use ($value) {
295 295
                 return $expr->column($value);
296 296
             };
297 297
         }
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
      * @param bool $not
312 312
      * @return WhereStatement|Select|Delete|update
313 313
      */
314
-    protected function addBetweenCondition(mixed $value1, mixed $value2, bool $not): WhereStatement|Select|Delete|update
314
+    protected function addBetweenCondition(mixed $value1, mixed $value2, bool $not): WhereStatement | Select | Delete | update
315 315
     {
316 316
         $this->queryStatement->addWhereBetween(
317 317
             $this->column,
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
      * @param bool $not
330 330
      * @return WhereStatement|Select|Delete|update
331 331
      */
332
-    protected function addLikeCondition(string $pattern, bool $not): WhereStatement|Select|Delete|update
332
+    protected function addLikeCondition(string $pattern, bool $not): WhereStatement | Select | Delete | update
333 333
     {
334 334
         $this->queryStatement->addWhereLike(
335 335
             $this->column,
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
      * @param bool $not
347 347
      * @return WhereStatement|Select|Delete|update
348 348
      */
349
-    protected function addInCondition(mixed $value, bool $not): WhereStatement|Select|Delete|update
349
+    protected function addInCondition(mixed $value, bool $not): WhereStatement | Select | Delete | update
350 350
     {
351 351
         $this->queryStatement->addWhereIn($this->column, $value, $this->separator, $not);
352 352
 
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
      * @param bool $not
358 358
      * @return WhereStatement|Select|Delete|Update
359 359
      */
360
-    protected function addNullCondition(bool $not): WhereStatement|Select|Delete|Update
360
+    protected function addNullCondition(bool $not): WhereStatement | Select | Delete | Update
361 361
     {
362 362
         $this->queryStatement->addWhereNull($this->column, $this->separator, $not);
363 363
 
Please login to merge, or discard this patch.
src/Query/Select.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      *
82 82
      * @return ResultSet
83 83
      */
84
-    public function select(string|Expression|Closure|array $columns = []): ResultSet
84
+    public function select(string | Expression | Closure | array $columns = []): ResultSet
85 85
     {
86 86
         parent::select($columns);
87 87
         $driver = $this->connection->getDriver();
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      *
98 98
      * @return mixed
99 99
      */
100
-    public function column(string|Expression|Closure $name): mixed
100
+    public function column(string | Expression | Closure $name): mixed
101 101
     {
102 102
         parent::column($name);
103 103
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      * @return int
112 112
      */
113 113
     public function count(
114
-        string|Expression|Closure $column = '*',
114
+        string | Expression | Closure $column = '*',
115 115
         bool $distinct = false
116 116
     ): int {
117 117
         parent::count($column, $distinct);
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      *
125 125
      * @return int|float
126 126
      */
127
-    public function avg(string|Expression|Closure $column, bool $distinct = false): int|float
127
+    public function avg(string | Expression | Closure $column, bool $distinct = false): int | float
128 128
     {
129 129
         parent::avg($column, $distinct);
130 130
         return $this->getColumnResult();
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      *
137 137
      * @return int|float
138 138
      */
139
-    public function sum(string|Expression|Closure $column, bool $distinct = false): int|float
139
+    public function sum(string | Expression | Closure $column, bool $distinct = false): int | float
140 140
     {
141 141
         parent::sum($column, $distinct);
142 142
         return $this->getColumnResult();
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      *
149 149
      * @return int|float
150 150
      */
151
-    public function min(string|Expression|Closure $column, bool $distinct = false): int|float
151
+    public function min(string | Expression | Closure $column, bool $distinct = false): int | float
152 152
     {
153 153
         parent::min($column, $distinct);
154 154
         return $this->getColumnResult();
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
      *
161 161
      * @return int|float
162 162
      */
163
-    public function max(string|Expression|Closure $column, bool $distinct = false): int|float
163
+    public function max(string | Expression | Closure $column, bool $distinct = false): int | float
164 164
     {
165 165
         parent::max($column, $distinct);
166 166
         return $this->getColumnResult();
Please login to merge, or discard this patch.