Passed
Pull Request — master (#483)
by
unknown
02:44
created
src/Components/CreateDefinition.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
                     $state = 4;
244 244
                 } elseif ($token->type === Token::TYPE_SYMBOL || $token->type === Token::TYPE_NONE) {
245 245
                     $expr->name = $token->value;
246
-                    if (! $expr->isConstraint) {
246
+                    if (!$expr->isConstraint) {
247 247
                         $state = 2;
248 248
                     }
249 249
                 } elseif ($token->type === Token::TYPE_KEYWORD) {
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 
285 285
                 $state = 5;
286 286
             } elseif ($state === 5) {
287
-                if (! empty($expr->type) || ! empty($expr->key)) {
287
+                if (!empty($expr->type) || !empty($expr->key)) {
288 288
                     $ret[] = $expr;
289 289
                 }
290 290
 
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
         }
305 305
 
306 306
         // Last iteration was not saved.
307
-        if (! empty($expr->type) || ! empty($expr->key)) {
307
+        if (!empty($expr->type) || !empty($expr->key)) {
308 308
             $ret[] = $expr;
309 309
         }
310 310
 
@@ -336,16 +336,16 @@  discard block
 block discarded – undo
336 336
             $tmp .= Context::escape($component->name) . ' ';
337 337
         }
338 338
 
339
-        if (! empty($component->type)) {
339
+        if (!empty($component->type)) {
340 340
             $component->type->lowercase = true;
341 341
             $tmp .= DataType::build($component->type) . ' ';
342 342
         }
343 343
 
344
-        if (! empty($component->key)) {
344
+        if (!empty($component->key)) {
345 345
             $tmp .= $component->key . ' ';
346 346
         }
347 347
 
348
-        if (! empty($component->references)) {
348
+        if (!empty($component->references)) {
349 349
             $tmp .= 'REFERENCES ' . $component->references . ' ';
350 350
         }
351 351
 
Please login to merge, or discard this patch.
src/Components/IntoKeyword.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -264,7 +264,7 @@
 block discarded – undo
264 264
     public static function build($component): string
265 265
     {
266 266
         if ($component->dest instanceof Expression) {
267
-            $columns = ! empty($component->columns) ? '(`' . implode('`, `', $component->columns) . '`)' : '';
267
+            $columns = !empty($component->columns) ? '(`' . implode('`, `', $component->columns) . '`)' : '';
268 268
 
269 269
             return $component->dest . $columns;
270 270
         }
Please login to merge, or discard this patch.
src/Components/Key.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -179,9 +179,9 @@  discard block
 block discarded – undo
179 179
             } elseif ($state === 1) {
180 180
                 if (($token->type === Token::TYPE_OPERATOR) && ($token->value === '(')) {
181 181
                     $positionBeforeSearch = $list->idx;
182
-                    $list->idx++;// Ignore the current token "(" or the search condition will always be true
182
+                    $list->idx++; // Ignore the current token "(" or the search condition will always be true
183 183
                     $nextToken = $list->getNext();
184
-                    $list->idx = $positionBeforeSearch;// Restore the position
184
+                    $list->idx = $positionBeforeSearch; // Restore the position
185 185
 
186 186
                     if ($nextToken !== null && $nextToken->value === '(') {
187 187
                         // Switch to expression mode
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
                 if ($token->type === Token::TYPE_OPERATOR) {
231 231
                     // This got back to here and we reached the end of the expression
232 232
                     if ($token->value === ')') {
233
-                        $state = 4;// go back to state 4 to fetch options
233
+                        $state = 4; // go back to state 4 to fetch options
234 234
                         continue;
235 235
                     }
236 236
 
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
     public static function build($component): string
270 270
     {
271 271
         $ret = $component->type . ' ';
272
-        if (! empty($component->name)) {
272
+        if (!empty($component->name)) {
273 273
             $ret .= Context::escape($component->name) . ' ';
274 274
         }
275 275
 
Please login to merge, or discard this patch.
src/Components/ParameterDefinition.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@
 block discarded – undo
145 145
     public static function build($component): string
146 146
     {
147 147
         $tmp = '';
148
-        if (! empty($component->inOut)) {
148
+        if (!empty($component->inOut)) {
149 149
             $tmp .= $component->inOut . ' ';
150 150
         }
151 151
 
Please login to merge, or discard this patch.
src/Components/JoinKeyword.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
             }
191 191
         }
192 192
 
193
-        if (! empty($expr->type)) {
193
+        if (!empty($expr->type)) {
194 194
             $ret[] = $expr;
195 195
         }
196 196
 
@@ -212,9 +212,9 @@  discard block
 block discarded – undo
212 212
         $ret = [];
213 213
         foreach ($component as $c) {
214 214
             $ret[] = array_search($c->type, static::$joins) . ' ' . $c->expr
215
-                . (! empty($c->on)
215
+                . (!empty($c->on)
216 216
                     ? ' ON ' . Condition::buildAll($c->on) : '')
217
-                . (! empty($c->using)
217
+                . (!empty($c->using)
218 218
                     ? ' USING ' . ArrayObj::build($c->using) : '');
219 219
         }
220 220
 
Please login to merge, or discard this patch.
src/Components/WithKeyword.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
      */
51 51
     public static function build($component): string
52 52
     {
53
-        if (! isset($component->statement)) {
53
+        if (!isset($component->statement)) {
54 54
             throw new RuntimeException('No statement inside WITH');
55 55
         }
56 56
 
Please login to merge, or discard this patch.
src/Statements/CreateStatement.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
     public function build(): string
412 412
     {
413 413
         $fields = '';
414
-        if (! empty($this->fields)) {
414
+        if (!empty($this->fields)) {
415 415
             if (is_array($this->fields)) {
416 416
                 $fields = CreateDefinition::buildAll($this->fields) . ' ';
417 417
             } elseif ($this->fields instanceof ArrayObj) {
@@ -450,23 +450,23 @@  discard block
 block discarded – undo
450 450
 
451 451
             $partition = '';
452 452
 
453
-            if (! empty($this->partitionBy)) {
453
+            if (!empty($this->partitionBy)) {
454 454
                 $partition .= "\nPARTITION BY " . $this->partitionBy;
455 455
             }
456 456
 
457
-            if (! empty($this->partitionsNum)) {
457
+            if (!empty($this->partitionsNum)) {
458 458
                 $partition .= "\nPARTITIONS " . $this->partitionsNum;
459 459
             }
460 460
 
461
-            if (! empty($this->subpartitionBy)) {
461
+            if (!empty($this->subpartitionBy)) {
462 462
                 $partition .= "\nSUBPARTITION BY " . $this->subpartitionBy;
463 463
             }
464 464
 
465
-            if (! empty($this->subpartitionsNum)) {
465
+            if (!empty($this->subpartitionsNum)) {
466 466
                 $partition .= "\nSUBPARTITIONS " . $this->subpartitionsNum;
467 467
             }
468 468
 
469
-            if (! empty($this->partitions)) {
469
+            if (!empty($this->partitions)) {
470 470
                 $partition .= "\n" . PartitionDefinition::buildAll($this->partitions);
471 471
             }
472 472
 
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
                 . OptionsArray::build($this->options) . ' '
491 491
                 . Expression::build($this->name) . ' '
492 492
                 . $fields . ' AS ' . $builtStatement
493
-                . (! empty($this->body) ? TokensList::build($this->body) : '') . ' '
493
+                . (!empty($this->body) ? TokensList::build($this->body) : '') . ' '
494 494
                 . OptionsArray::build($this->entityOptions);
495 495
         }
496 496
 
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
             ]
549 549
         );
550 550
 
551
-        if (! isset($this->name) || ($this->name === '')) {
551
+        if (!isset($this->name) || ($this->name === '')) {
552 552
             $parser->error('The name of the entity was expected.', $list->tokens[$list->idx]);
553 553
         } else {
554 554
             ++$list->idx; // Skipping field.
@@ -660,7 +660,7 @@  discard block
 block discarded – undo
660 660
                         $token = $list->getNextOfType(Token::TYPE_NUMBER);
661 661
                         --$list->idx; // `getNextOfType` also advances one position.
662 662
                         $this->subpartitionsNum = $token->value;
663
-                    } elseif (! empty($field)) {
663
+                    } elseif (!empty($field)) {
664 664
                         /*
665 665
                          * Handling the content of `PARTITION BY` and `SUBPARTITION BY`.
666 666
                          */
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
                             $field = null;
690 690
                         }
691 691
                     } elseif (($token->type === Token::TYPE_OPERATOR) && ($token->value === '(')) {
692
-                        if (! empty($this->partitionBy)) {
692
+                        if (!empty($this->partitionBy)) {
693 693
                             $this->partitions = ArrayObj::parse(
694 694
                                 $parser,
695 695
                                 $list,
Please login to merge, or discard this patch.
src/Statements/ReplaceStatement.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      *
64 64
      * @var ArrayObj[]|null
65 65
      */
66
-    public array|null $values = null;
66
+    public array | null $values = null;
67 67
 
68 68
     /**
69 69
      * If SET clause is present
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      *
72 72
      * @var SetOperation[]|null
73 73
      */
74
-    public array|null $set = null;
74
+    public array | null $set = null;
75 75
 
76 76
     /**
77 77
      * If SELECT clause is present
Please login to merge, or discard this patch.