Passed
Pull Request — master (#532)
by
unknown
03:00
created
src/Statements/SelectStatement.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -242,67 +242,67 @@  discard block
 block discarded – undo
242 242
      *
243 243
      * @var IndexHint[]|null
244 244
      */
245
-    public array|null $indexHints = null;
245
+    public array | null $indexHints = null;
246 246
 
247 247
     /**
248 248
      * Partitions used as source for this statement.
249 249
      */
250
-    public ArrayObj|null $partition = null;
250
+    public ArrayObj | null $partition = null;
251 251
 
252 252
     /**
253 253
      * Conditions used for filtering each row of the result set.
254 254
      *
255 255
      * @var Condition[]|null
256 256
      */
257
-    public array|null $where = null;
257
+    public array | null $where = null;
258 258
 
259 259
     /**
260 260
      * Conditions used for grouping the result set.
261 261
      *
262 262
      * @var GroupKeyword[]|null
263 263
      */
264
-    public array|null $group = null;
264
+    public array | null $group = null;
265 265
 
266 266
     /**
267 267
      * List of options available for the GROUP BY component.
268 268
      */
269
-    public OptionsArray|null $groupOptions = null;
269
+    public OptionsArray | null $groupOptions = null;
270 270
 
271 271
     /**
272 272
      * Conditions used for filtering the result set.
273 273
      *
274 274
      * @var Condition[]|null
275 275
      */
276
-    public array|null $having = null;
276
+    public array | null $having = null;
277 277
 
278 278
     /**
279 279
      * Specifies the order of the rows in the result set.
280 280
      *
281 281
      * @var OrderKeyword[]|null
282 282
      */
283
-    public array|null $order = null;
283
+    public array | null $order = null;
284 284
 
285 285
     /**
286 286
      * Conditions used for limiting the size of the result set.
287 287
      */
288
-    public Limit|null $limit = null;
288
+    public Limit | null $limit = null;
289 289
 
290 290
     /**
291 291
      * Procedure that should process the data in the result set.
292 292
      */
293
-    public FunctionCall|null $procedure = null;
293
+    public FunctionCall | null $procedure = null;
294 294
 
295 295
     /**
296 296
      * Destination of this result set.
297 297
      */
298
-    public IntoKeyword|null $into = null;
298
+    public IntoKeyword | null $into = null;
299 299
 
300 300
     /**
301 301
      * Joins.
302 302
      *
303 303
      * @var JoinKeyword[]|null
304 304
      */
305
-    public array|null $join = null;
305
+    public array | null $join = null;
306 306
 
307 307
     /**
308 308
      * Unions.
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
      *
317 317
      * @see SelectStatement::STATEMENT_END_OPTIONS
318 318
      */
319
-    public OptionsArray|null $endOptions = null;
319
+    public OptionsArray | null $endOptions = null;
320 320
 
321 321
     /**
322 322
      * Gets the clauses of this statement.
@@ -371,28 +371,28 @@  discard block
 block discarded – undo
371 371
         $expressions = $this->from;
372 372
 
373 373
         // Adding expressions from JOIN.
374
-        if (! empty($this->join)) {
374
+        if (!empty($this->join)) {
375 375
             foreach ($this->join as $join) {
376 376
                 $expressions[] = $join->expr;
377 377
             }
378 378
         }
379 379
 
380 380
         foreach ($expressions as $expr) {
381
-            if (! isset($expr->table) || ($expr->table === '')) {
381
+            if (!isset($expr->table) || ($expr->table === '')) {
382 382
                 continue;
383 383
             }
384 384
 
385 385
             $thisDb = isset($expr->database) && ($expr->database !== '') ?
386 386
                 $expr->database : $database;
387 387
 
388
-            if (! isset($retval[$thisDb])) {
388
+            if (!isset($retval[$thisDb])) {
389 389
                 $retval[$thisDb] = [
390 390
                     'alias' => null,
391 391
                     'tables' => [],
392 392
                 ];
393 393
             }
394 394
 
395
-            if (! isset($retval[$thisDb]['tables'][$expr->table])) {
395
+            if (!isset($retval[$thisDb]['tables'][$expr->table])) {
396 396
                 $retval[$thisDb]['tables'][$expr->table] = [
397 397
                     'alias' => isset($expr->alias) && ($expr->alias !== '') ?
398 398
                         $expr->alias : null,
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
                 ];
401 401
             }
402 402
 
403
-            if (! isset($tables[$thisDb])) {
403
+            if (!isset($tables[$thisDb])) {
404 404
                 $tables[$thisDb] = [];
405 405
             }
406 406
 
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
         }
409 409
 
410 410
         foreach ($this->expr as $expr) {
411
-            if (! isset($expr->column, $expr->alias) || ($expr->column === '') || ($expr->alias === '')) {
411
+            if (!isset($expr->column, $expr->alias) || ($expr->column === '') || ($expr->alias === '')) {
412 412
                 continue;
413 413
             }
414 414
 
Please login to merge, or discard this patch.
src/Statements/PurgeStatement.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,17 +25,17 @@
 block discarded – undo
25 25
     /**
26 26
      * The type of logs
27 27
      */
28
-    public string|null $logType = null;
28
+    public string | null $logType = null;
29 29
 
30 30
     /**
31 31
      * The end option of this query.
32 32
      */
33
-    public string|null $endOption = null;
33
+    public string | null $endOption = null;
34 34
 
35 35
     /**
36 36
      * The end expr of this query.
37 37
      */
38
-    public Expression|null $endExpr = null;
38
+    public Expression | null $endExpr = null;
39 39
 
40 40
     public function build(): string
41 41
     {
Please login to merge, or discard this patch.
src/Statements/TransactionStatement.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,19 +26,19 @@
 block discarded – undo
26 26
     /**
27 27
      * The type of this query.
28 28
      */
29
-    public int|null $type = null;
29
+    public int | null $type = null;
30 30
 
31 31
     /**
32 32
      * The list of statements in this transaction.
33 33
      *
34 34
      * @var Statement[]|null
35 35
      */
36
-    public array|null $statements = null;
36
+    public array | null $statements = null;
37 37
 
38 38
     /**
39 39
      * The ending transaction statement which may be a `COMMIT` or a `ROLLBACK`.
40 40
      */
41
-    public TransactionStatement|null $end = null;
41
+    public TransactionStatement | null $end = null;
42 42
 
43 43
     /**
44 44
      * Options for this query.
Please login to merge, or discard this patch.
src/Statements/RenameStatement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      *
25 25
      * @var RenameOperation[]|null
26 26
      */
27
-    public array|null $renames = null;
27
+    public array | null $renames = null;
28 28
 
29 29
     /**
30 30
      * Function called before the token is processed.
Please login to merge, or discard this patch.
src/Statements/MaintenanceStatement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      *
25 25
      * @var Expression[]|null
26 26
      */
27
-    public array|null $tables = null;
27
+    public array | null $tables = null;
28 28
 
29 29
     /**
30 30
      * Function called after the token was processed.
Please login to merge, or discard this patch.
src/Statements/DeleteStatement.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -106,52 +106,52 @@
 block discarded – undo
106 106
      *
107 107
      * @var Expression[]|null
108 108
      */
109
-    public array|null $from = null;
109
+    public array | null $from = null;
110 110
 
111 111
     /**
112 112
      * Joins.
113 113
      *
114 114
      * @var JoinKeyword[]|null
115 115
      */
116
-    public array|null $join = null;
116
+    public array | null $join = null;
117 117
 
118 118
     /**
119 119
      * Tables used as sources for this statement.
120 120
      *
121 121
      * @var Expression[]|null
122 122
      */
123
-    public array|null $using = null;
123
+    public array | null $using = null;
124 124
 
125 125
     /**
126 126
      * Columns used in this statement.
127 127
      *
128 128
      * @var Expression[]|null
129 129
      */
130
-    public array|null $columns = null;
130
+    public array | null $columns = null;
131 131
 
132 132
     /**
133 133
      * Partitions used as source for this statement.
134 134
      */
135
-    public ArrayObj|null $partition = null;
135
+    public ArrayObj | null $partition = null;
136 136
 
137 137
     /**
138 138
      * Conditions used for filtering each row of the result set.
139 139
      *
140 140
      * @var Condition[]|null
141 141
      */
142
-    public array|null $where = null;
142
+    public array | null $where = null;
143 143
 
144 144
     /**
145 145
      * Specifies the order of the rows in the result set.
146 146
      *
147 147
      * @var OrderKeyword[]|null
148 148
      */
149
-    public array|null $order = null;
149
+    public array | null $order = null;
150 150
 
151 151
     /**
152 152
      * Conditions used for limiting the size of the result set.
153 153
      */
154
-    public Limit|null $limit = null;
154
+    public Limit | null $limit = null;
155 155
 
156 156
     public function build(): string
157 157
     {
Please login to merge, or discard this patch.
src/Statements/CreateStatement.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
      *
270 270
      * Used by all `CREATE` statements.
271 271
      */
272
-    public Expression|null $name = null;
272
+    public Expression | null $name = null;
273 273
 
274 274
     /**
275 275
      * The options of the entity (table, procedure, function, etc.).
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
      * @see CreateStatement::FUNCTION_OPTIONS
281 281
      * @see CreateStatement::TRIGGER_OPTIONS
282 282
      */
283
-    public OptionsArray|null $entityOptions = null;
283
+    public OptionsArray | null $entityOptions = null;
284 284
 
285 285
     /**
286 286
      * If `CREATE TABLE`, a list of columns and keys.
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
      *
291 291
      * @var CreateDefinition[]|ArrayObj|null
292 292
      */
293
-    public array|ArrayObj|null $fields = null;
293
+    public array | ArrayObj | null $fields = null;
294 294
 
295 295
     /**
296 296
      * If `CREATE TABLE WITH`.
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
      *
300 300
      * Used by `CREATE TABLE`, `CREATE VIEW`
301 301
      */
302
-    public WithStatement|null $with = null;
302
+    public WithStatement | null $with = null;
303 303
 
304 304
     /**
305 305
      * If `CREATE TABLE ... SELECT`.
@@ -307,55 +307,55 @@  discard block
 block discarded – undo
307 307
      *
308 308
      * Used by `CREATE TABLE`, `CREATE VIEW`
309 309
      */
310
-    public SelectStatement|null $select = null;
310
+    public SelectStatement | null $select = null;
311 311
 
312 312
     /**
313 313
      * If `CREATE TABLE ... LIKE`.
314 314
      *
315 315
      * Used by `CREATE TABLE`
316 316
      */
317
-    public Expression|null $like = null;
317
+    public Expression | null $like = null;
318 318
 
319 319
     /**
320 320
      * Expression used for partitioning.
321 321
      */
322
-    public string|null $partitionBy = null;
322
+    public string | null $partitionBy = null;
323 323
 
324 324
     /**
325 325
      * The number of partitions.
326 326
      */
327
-    public int|null $partitionsNum = null;
327
+    public int | null $partitionsNum = null;
328 328
 
329 329
     /**
330 330
      * Expression used for subpartitioning.
331 331
      */
332
-    public string|null $subpartitionBy = null;
332
+    public string | null $subpartitionBy = null;
333 333
 
334 334
     /**
335 335
      * The number of subpartitions.
336 336
      */
337
-    public int|null $subpartitionsNum = null;
337
+    public int | null $subpartitionsNum = null;
338 338
 
339 339
     /**
340 340
      * The partition of the new table.
341 341
      *
342 342
      * @var PartitionDefinition[]|null
343 343
      */
344
-    public array|null $partitions = null;
344
+    public array | null $partitions = null;
345 345
 
346 346
     /**
347 347
      * If `CREATE TRIGGER` the name of the table.
348 348
      *
349 349
      * Used by `CREATE TRIGGER`.
350 350
      */
351
-    public Expression|null $table = null;
351
+    public Expression | null $table = null;
352 352
 
353 353
     /**
354 354
      * The return data type of this routine.
355 355
      *
356 356
      * Used by `CREATE FUNCTION`.
357 357
      */
358
-    public DataType|null $return = null;
358
+    public DataType | null $return = null;
359 359
 
360 360
     /**
361 361
      * The parameters of this routine.
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
      *
365 365
      * @var ParameterDefinition[]|null
366 366
      */
367
-    public array|null $parameters = null;
367
+    public array | null $parameters = null;
368 368
 
369 369
     /**
370 370
      * The body of this function or procedure.
@@ -417,23 +417,23 @@  discard block
 block discarded – undo
417 417
 
418 418
             $partition = '';
419 419
 
420
-            if (! empty($this->partitionBy)) {
420
+            if (!empty($this->partitionBy)) {
421 421
                 $partition .= "\nPARTITION BY " . $this->partitionBy;
422 422
             }
423 423
 
424
-            if (! empty($this->partitionsNum)) {
424
+            if (!empty($this->partitionsNum)) {
425 425
                 $partition .= "\nPARTITIONS " . $this->partitionsNum;
426 426
             }
427 427
 
428
-            if (! empty($this->subpartitionBy)) {
428
+            if (!empty($this->subpartitionBy)) {
429 429
                 $partition .= "\nSUBPARTITION BY " . $this->subpartitionBy;
430 430
             }
431 431
 
432
-            if (! empty($this->subpartitionsNum)) {
432
+            if (!empty($this->subpartitionsNum)) {
433 433
                 $partition .= "\nSUBPARTITIONS " . $this->subpartitionsNum;
434 434
             }
435 435
 
436
-            if (! empty($this->partitions)) {
436
+            if (!empty($this->partitions)) {
437 437
                 $partition .= "\n" . PartitionDefinition::buildAll($this->partitions);
438 438
             }
439 439
 
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
                         $token = $list->getNextOfType(TokenType::Number);
628 628
                         --$list->idx; // `getNextOfType` also advances one position.
629 629
                         $this->subpartitionsNum = $token->value;
630
-                    } elseif (! empty($field)) {
630
+                    } elseif (!empty($field)) {
631 631
                         /*
632 632
                          * Handling the content of `PARTITION BY` and `SUBPARTITION BY`.
633 633
                          */
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
                             $field = null;
657 657
                         }
658 658
                     } elseif (($token->type === TokenType::Operator) && ($token->value === '(')) {
659
-                        if (! empty($this->partitionBy)) {
659
+                        if (!empty($this->partitionBy)) {
660 660
                             $this->partitions = ArrayObj::parse(
661 661
                                 $parser,
662 662
                                 $list,
Please login to merge, or discard this patch.
src/Statements/LoadStatement.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -88,70 +88,70 @@
 block discarded – undo
88 88
     /**
89 89
      * File name being used to load data.
90 90
      */
91
-    public Expression|null $fileName = null;
91
+    public Expression | null $fileName = null;
92 92
 
93 93
     /**
94 94
      * Table used as destination for this statement.
95 95
      */
96
-    public Expression|null $table = null;
96
+    public Expression | null $table = null;
97 97
 
98 98
     /**
99 99
      * Partitions used as source for this statement.
100 100
      */
101
-    public ArrayObj|null $partition = null;
101
+    public ArrayObj | null $partition = null;
102 102
 
103 103
     /**
104 104
      * Character set used in this statement.
105 105
      */
106
-    public Expression|null $charsetName = null;
106
+    public Expression | null $charsetName = null;
107 107
 
108 108
     /**
109 109
      * Options for FIELDS/COLUMNS keyword.
110 110
      *
111 111
      * @see LoadStatement::STATEMENT_FIELDS_OPTIONS
112 112
      */
113
-    public OptionsArray|null $fieldsOptions = null;
113
+    public OptionsArray | null $fieldsOptions = null;
114 114
 
115 115
     /**
116 116
      * Whether to use `FIELDS` or `COLUMNS` while building.
117 117
      */
118
-    public string|null $fieldsKeyword = null;
118
+    public string | null $fieldsKeyword = null;
119 119
 
120 120
     /**
121 121
      * Options for OPTIONS keyword.
122 122
      *
123 123
      * @see LoadStatement::STATEMENT_LINES_OPTIONS
124 124
      */
125
-    public OptionsArray|null $linesOptions = null;
125
+    public OptionsArray | null $linesOptions = null;
126 126
 
127 127
     /**
128 128
      * Column names or user variables.
129 129
      *
130 130
      * @var Expression[]|null
131 131
      */
132
-    public array|null $columnNamesOrUserVariables = null;
132
+    public array | null $columnNamesOrUserVariables = null;
133 133
 
134 134
     /**
135 135
      * SET clause's updated values(optional).
136 136
      *
137 137
      * @var SetOperation[]|null
138 138
      */
139
-    public array|null $set = null;
139
+    public array | null $set = null;
140 140
 
141 141
     /**
142 142
      * Ignore 'number' LINES/ROWS.
143 143
      */
144
-    public Expression|null $ignoreNumber = null;
144
+    public Expression | null $ignoreNumber = null;
145 145
 
146 146
     /**
147 147
      * REPLACE/IGNORE Keyword.
148 148
      */
149
-    public string|null $replaceIgnore = null;
149
+    public string | null $replaceIgnore = null;
150 150
 
151 151
     /**
152 152
      * LINES/ROWS Keyword.
153 153
      */
154
-    public string|null $linesRows = null;
154
+    public string | null $linesRows = null;
155 155
 
156 156
     public function build(): string
157 157
     {
Please login to merge, or discard this patch.
src/Statements/AlterStatement.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,14 +23,14 @@
 block discarded – undo
23 23
     /**
24 24
      * Table affected.
25 25
      */
26
-    public Expression|null $table = null;
26
+    public Expression | null $table = null;
27 27
 
28 28
     /**
29 29
      * Column affected by this statement.
30 30
      *
31 31
      * @var AlterOperation[]|null
32 32
      */
33
-    public array|null $altered = [];
33
+    public array | null $altered = [];
34 34
 
35 35
     /**
36 36
      * Options of this statement.
Please login to merge, or discard this patch.