Passed
Pull Request — master (#463)
by Maurício
03:17
created
src/Utils/Formatter.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
                 // The options of a clause should stay on the same line and everything that follows.
437 437
                 if (
438 438
                     $this->options['parts_newline']
439
-                    && ! $formattedOptions
439
+                    && !$formattedOptions
440 440
                     && empty(self::$inlineClauses[$lastClause])
441 441
                     && (
442 442
                         $curr->type !== Token::TYPE_KEYWORD
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
                         end($blocksLineEndings) === true
497 497
                         || (
498 498
                             empty(self::$inlineClauses[$lastClause])
499
-                            && ! $shortGroup
499
+                            && !$shortGroup
500 500
                             && $this->options['parts_newline']
501 501
                         )
502 502
                     ) {
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
                     $lineEnded = false;
533 533
                 } elseif (
534 534
                     $prev->keyword === 'DELIMITER'
535
-                    || ! (
535
+                    || !(
536 536
                     ($prev->type === Token::TYPE_OPERATOR && ($prev->value === '.' || $prev->value === '('))
537 537
                     // No space after . (
538 538
                     || ($curr->type === Token::TYPE_OPERATOR
@@ -648,12 +648,12 @@  discard block
 block discarded – undo
648 648
         static $prev;
649 649
 
650 650
         foreach ($this->options['formats'] as $format) {
651
-            if ($token->type !== $format['type'] || ! (($token->flags & $format['flags']) === $format['flags'])) {
651
+            if ($token->type !== $format['type'] || !(($token->flags & $format['flags']) === $format['flags'])) {
652 652
                 continue;
653 653
             }
654 654
 
655 655
             // Running transformation function.
656
-            if (! empty($format['function'])) {
656
+            if (!empty($format['function'])) {
657 657
                 $func = $format['function'];
658 658
                 $text = $func($text);
659 659
             }
@@ -764,7 +764,7 @@  discard block
 block discarded – undo
764 764
      *
765 765
      * @psalm-return 1|2|false
766 766
      */
767
-    public static function isClause($token): int|false
767
+    public static function isClause($token): int | false
768 768
     {
769 769
         if (
770 770
             ($token->type === Token::TYPE_KEYWORD && isset(Parser::$statementParsers[$token->keyword]))
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::build($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::build($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.