Passed
Pull Request — master (#363)
by
unknown
12:28
created
src/Statements/CreateStatement.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
     public function build()
418 418
     {
419 419
         $fields = '';
420
-        if (! empty($this->fields)) {
420
+        if (!empty($this->fields)) {
421 421
             if (is_array($this->fields)) {
422 422
                 $fields = CreateDefinition::build($this->fields) . ' ';
423 423
             } elseif ($this->fields instanceof ArrayObj) {
@@ -449,23 +449,23 @@  discard block
 block discarded – undo
449 449
 
450 450
             $partition = '';
451 451
 
452
-            if (! empty($this->partitionBy)) {
452
+            if (!empty($this->partitionBy)) {
453 453
                 $partition .= "\nPARTITION BY " . $this->partitionBy;
454 454
             }
455 455
 
456
-            if (! empty($this->partitionsNum)) {
456
+            if (!empty($this->partitionsNum)) {
457 457
                 $partition .= "\nPARTITIONS " . $this->partitionsNum;
458 458
             }
459 459
 
460
-            if (! empty($this->subpartitionBy)) {
460
+            if (!empty($this->subpartitionBy)) {
461 461
                 $partition .= "\nSUBPARTITION BY " . $this->subpartitionBy;
462 462
             }
463 463
 
464
-            if (! empty($this->subpartitionsNum)) {
464
+            if (!empty($this->subpartitionsNum)) {
465 465
                 $partition .= "\nSUBPARTITIONS " . $this->subpartitionsNum;
466 466
             }
467 467
 
468
-            if (! empty($this->partitions)) {
468
+            if (!empty($this->partitions)) {
469 469
                 $partition .= "\n" . PartitionDefinition::build($this->partitions);
470 470
             }
471 471
 
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
                 . OptionsArray::build($this->options) . ' '
488 488
                 . Expression::build($this->name) . ' '
489 489
                 . $fields . ' AS ' . $builtStatement
490
-                . (! empty($this->body) ? TokensList::build($this->body) : '') . ' '
490
+                . (!empty($this->body) ? TokensList::build($this->body) : '') . ' '
491 491
                 . OptionsArray::build($this->entityOptions);
492 492
         } elseif ($this->options->has('TRIGGER')) {
493 493
             return 'CREATE '
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
             ]
542 542
         );
543 543
 
544
-        if (! isset($this->name) || ($this->name === '')) {
544
+        if (!isset($this->name) || ($this->name === '')) {
545 545
             $parser->error('The name of the entity was expected.', $list->tokens[$list->idx]);
546 546
         } else {
547 547
             ++$list->idx; // Skipping field.
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
                         $token = $list->getNextOfType(Token::TYPE_NUMBER);
658 658
                         --$list->idx; // `getNextOfType` also advances one position.
659 659
                         $this->subpartitionsNum = $token->value;
660
-                    } elseif (! empty($field)) {
660
+                    } elseif (!empty($field)) {
661 661
                         /*
662 662
                          * Handling the content of `PARTITION BY` and `SUBPARTITION BY`.
663 663
                          */
@@ -686,7 +686,7 @@  discard block
 block discarded – undo
686 686
                             $field = null;
687 687
                         }
688 688
                     } elseif (($token->type === Token::TYPE_OPERATOR) && ($token->value === '(')) {
689
-                        if (! empty($this->partitionBy)) {
689
+                        if (!empty($this->partitionBy)) {
690 690
                             $this->partitions = ArrayObj::parse(
691 691
                                 $parser,
692 692
                                 $list,
Please login to merge, or discard this patch.
src/Statements/WithStatement.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                     break;
128 128
                 }
129 129
             } elseif ($state === 2) {
130
-                if (! ($token->type === Token::TYPE_KEYWORD && $token->keyword === 'AS')) {
130
+                if (!($token->type === Token::TYPE_KEYWORD && $token->keyword === 'AS')) {
131 131
                     $parser->error('AS keyword was expected.', $token);
132 132
                     break;
133 133
                 }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
                 $list->getNext();
144 144
                 $nextKeyword = $list->getNext();
145 145
 
146
-                if (! ($token->value === '(' && ($nextKeyword && $nextKeyword->value === 'SELECT'))) {
146
+                if (!($token->value === '(' && ($nextKeyword && $nextKeyword->value === 'SELECT'))) {
147 147
                     $parser->error('Subquery of the CTE was expected.', $token);
148 148
                     $list->idx = $idxBeforeGetNext;
149 149
                     break;
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
             }
284 284
 
285 285
             ++$list->idx;
286
-            if (! isset($list->tokens[$list->idx])) {
286
+            if (!isset($list->tokens[$list->idx])) {
287 287
                 break;
288 288
             }
289 289
 
Please login to merge, or discard this patch.
Indentation   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,7 +22,6 @@  discard block
 block discarded – undo
22 22
 
23 23
 /**
24 24
  * `WITH` statement.
25
-
26 25
  *  WITH [RECURSIVE] query_name [ (column_name [,...]) ] AS (SELECT ...) [, ...]
27 26
  */
28 27
 final class WithStatement extends Statement
@@ -240,11 +239,11 @@  discard block
 block discarded – undo
240 239
 
241 240
         // 5 is the only valid end state
242 241
         if ($state !== 5) {
243
-             /**
244
-             * Token parsed at this moment.
245
-             *
246
-             * @var Token
247
-             */
242
+                /**
243
+                 * Token parsed at this moment.
244
+                 *
245
+                 * @var Token
246
+                 */
248 247
             $token = $list->tokens[$list->idx];
249 248
 
250 249
             $parser->error('Unexpected end of the WITH CTE.', $token);
Please login to merge, or discard this patch.