Passed
Push — master ( d28f1e...3416cc )
by Maurício
03:59 queued 15s
created
src/Utils/Routine.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
             'opts' => [],
118 118
         ];
119 119
 
120
-        if (! empty($statement->parameters)) {
120
+        if (!empty($statement->parameters)) {
121 121
             $idx = 0;
122 122
             foreach ($statement->parameters as $param) {
123 123
                 $retval['dir'][$idx] = $param->inOut;
Please login to merge, or discard this patch.
src/Statements/LockStatement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
             }
100 100
 
101 101
             if ($state === 1) {
102
-                if (! $this->isLock) {
102
+                if (!$this->isLock) {
103 103
                     // UNLOCK statement should not have any more tokens
104 104
                     $parser->error('Unexpected token.', $token);
105 105
                     break;
Please login to merge, or discard this patch.
tools/TestGenerator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,15 +27,15 @@
 block discarded – undo
27 27
 $debug = empty($argv[3]) ? null : rtrim($argv[3], '/');
28 28
 
29 29
 // Checking if all directories are valid.
30
-if (! is_dir($input)) {
30
+if (!is_dir($input)) {
31 31
     throw new Exception('The input directory does not exist.');
32 32
 }
33 33
 
34
-if (! is_dir($output)) {
34
+if (!is_dir($output)) {
35 35
     throw new Exception('The output directory does not exist.');
36 36
 }
37 37
 
38
-if (($debug !== null) && (! is_dir($debug))) {
38
+if (($debug !== null) && (!is_dir($debug))) {
39 39
     throw new Exception('The debug directory does not exist.');
40 40
 }
41 41
 
Please login to merge, or discard this patch.
tools/ContextGenerator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@
 block discarded – undo
26 26
 $output = rtrim($argv[2], '/');
27 27
 
28 28
 // Checking if all directories are valid.
29
-if (! is_dir($input)) {
29
+if (!is_dir($input)) {
30 30
     throw new Exception('The input directory does not exist.');
31 31
 }
32 32
 
33
-if (! is_dir($output)) {
33
+if (!is_dir($output)) {
34 34
     throw new Exception('The output directory does not exist.');
35 35
 }
36 36
 
Please login to merge, or discard this patch.
src/Statements/WithStatement.php 2 patches
Indentation   +3 added lines, -4 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
@@ -263,9 +262,9 @@  discard block
 block discarded – undo
263 262
 
264 263
         // 5 is the only valid end state
265 264
         if ($state !== 5) {
266
-             /**
267
-             * Token parsed at this moment.
268
-             */
265
+                /**
266
+                 * Token parsed at this moment.
267
+                 */
269 268
             $token = $list->tokens[$list->idx];
270 269
 
271 270
             $parser->error('Unexpected end of the WITH CTE.', $token);
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     /**
63 63
      * holds the CTE parser.
64 64
      */
65
-    public Parser|null $cteStatementParser = null;
65
+    public Parser | null $cteStatementParser = null;
66 66
 
67 67
     /**
68 68
      * @param Parser     $parser the instance that requests parsing
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
             }
111 111
 
112 112
             if ($state === 0) {
113
-                if ($token->type !== TokenType::None || ! preg_match('/^[a-zA-Z0-9_$]+$/', $token->token)) {
113
+                if ($token->type !== TokenType::None || !preg_match('/^[a-zA-Z0-9_$]+$/', $token->token)) {
114 114
                     $parser->error('The name of the CTE was expected.', $token);
115 115
                     break;
116 116
                 }
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
                     break;
135 135
                 }
136 136
             } elseif ($state === 2) {
137
-                if (! ($token->type === TokenType::Keyword && $token->keyword === 'AS')) {
137
+                if (!($token->type === TokenType::Keyword && $token->keyword === 'AS')) {
138 138
                     $parser->error('AS keyword was expected.', $token);
139 139
                     break;
140 140
                 }
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
                 $list->idx++; // Ignore the current token
147 147
                 $nextKeyword = $list->getNext();
148 148
 
149
-                if (! ($token->value === '(' && ($nextKeyword && $nextKeyword->value === 'SELECT'))) {
149
+                if (!($token->value === '(' && ($nextKeyword && $nextKeyword->value === 'SELECT'))) {
150 150
                     $parser->error('Subquery of the CTE was expected.', $token);
151 151
                     $list->idx = $idxBeforeGetNext;
152 152
                     break;
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
     /**
294 294
      * Get tokens within the WITH expression to use them in another parser
295 295
      */
296
-    private function getSubTokenList(TokensList $list): ParserException|TokensList
296
+    private function getSubTokenList(TokensList $list): ParserException | TokensList
297 297
     {
298 298
         $idx = $list->idx;
299 299
         $token = $list->tokens[$list->idx];
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
             }
310 310
 
311 311
             ++$list->idx;
312
-            if (! isset($list->tokens[$list->idx])) {
312
+            if (!isset($list->tokens[$list->idx])) {
313 313
                 break;
314 314
             }
315 315
 
Please login to merge, or discard this patch.
tests/Misc/UtfStringTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
      * Test access to string.
87 87
      */
88 88
     #[DataProvider('utf8StringsProvider')]
89
-    public function testAccess(string $text, string|null $pos10, string|null $pos20): void
89
+    public function testAccess(string $text, string | null $pos10, string | null $pos20): void
90 90
     {
91 91
         $str = new UtfString($text);
92 92
         $this->assertEquals($pos10, $str->offsetGet(10));
Please login to merge, or discard this patch.
tests/Tools/ContextGeneratorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
         $this->assertEquals([
44 44
             TokenType::Keyword->value | Token::FLAG_KEYWORD_RESERVED => [
45 45
                 8 => ['RESERVED'],
46
-                9 => ['RESERVED2','RESERVED3','RESERVED4','RESERVED5'],
46
+                9 => ['RESERVED2', 'RESERVED3', 'RESERVED4', 'RESERVED5'],
47 47
             ],
48 48
             TokenType::Keyword->value | Token::FLAG_KEYWORD_FUNCTION => [8 => ['FUNCTION']],
49 49
             TokenType::Keyword->value | Token::FLAG_KEYWORD_DATA_TYPE => [8 => ['DATATYPE']],
Please login to merge, or discard this patch.
src/UtfString.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     {
79 79
         $this->str = $str;
80 80
         $this->byteLen = mb_strlen($str, '8bit');
81
-        if (! mb_check_encoding($str, 'UTF-8')) {
81
+        if (!mb_check_encoding($str, 'UTF-8')) {
82 82
             $this->charLen = 0;
83 83
         } else {
84 84
             $this->charLen = mb_strlen($str, 'UTF-8');
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      *
101 101
      * @param int $offset the offset to be returned
102 102
      */
103
-    public function offsetGet(mixed $offset): string|null
103
+    public function offsetGet(mixed $offset): string | null
104 104
     {
105 105
         // This function moves the internal byte and character pointer to the requested offset.
106 106
         // This function is part of hot code so the aim is to do the following
Please login to merge, or discard this patch.
src/Utils/Formatter.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
                 // The options of a clause should stay on the same line and everything that follows.
436 436
                 if (
437 437
                     $this->options['parts_newline']
438
-                    && ! $formattedOptions
438
+                    && !$formattedOptions
439 439
                     && empty(self::$inlineClauses[$lastClause])
440 440
                     && (
441 441
                         $curr->type !== TokenType::Keyword
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
                         end($blocksLineEndings) === true
493 493
                         || (
494 494
                             empty(self::$inlineClauses[$lastClause])
495
-                            && ! $shortGroup
495
+                            && !$shortGroup
496 496
                             && $this->options['parts_newline']
497 497
                         )
498 498
                     ) {
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
                     $lineEnded = false;
529 529
                 } elseif (
530 530
                     $prev->keyword === 'DELIMITER'
531
-                    || ! (
531
+                    || !(
532 532
                     ($prev->type === TokenType::Operator && ($prev->value === '.' || $prev->value === '('))
533 533
                     // No space after . (
534 534
                     || ($curr->type === TokenType::Operator
@@ -643,13 +643,13 @@  discard block
 block discarded – undo
643 643
 
644 644
         foreach ($this->options['formats'] as $format) {
645 645
             if (
646
-                $token->type->value !== $format['type'] || ! (($token->flags & $format['flags']) === $format['flags'])
646
+                $token->type->value !== $format['type'] || !(($token->flags & $format['flags']) === $format['flags'])
647 647
             ) {
648 648
                 continue;
649 649
             }
650 650
 
651 651
             // Running transformation function.
652
-            if (! empty($format['function'])) {
652
+            if (!empty($format['function'])) {
653 653
                 $func = $format['function'];
654 654
                 $text = $func($text);
655 655
             }
@@ -758,7 +758,7 @@  discard block
 block discarded – undo
758 758
      *
759 759
      * @psalm-return 1|2|false
760 760
      */
761
-    public static function isClause(Token $token): int|false
761
+    public static function isClause(Token $token): int | false
762 762
     {
763 763
         if (
764 764
             ($token->type === TokenType::Keyword && isset(Parser::STATEMENT_PARSERS[$token->keyword]))
Please login to merge, or discard this patch.