Passed
Pull Request — master (#363)
by
unknown
09:04
created
src/Utils/Tokens.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
         }
57 57
 
58 58
         // Flags.
59
-        return ! isset($pattern['flags'])
60
-            || (! (($pattern['flags'] & $token->flags) === 0));
59
+        return !isset($pattern['flags'])
60
+            || (!(($pattern['flags'] & $token->flags) === 0));
61 61
     }
62 62
 
63 63
     /**
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         $isList = $list instanceof TokensList;
76 76
 
77 77
         // Parsing the tokens.
78
-        if (! $isList) {
78
+        if (!$isList) {
79 79
             $list = Lexer::getTokens($list);
80 80
         }
81 81
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
                     ++$j;
136 136
                 }
137 137
 
138
-                if (! static::match($list->tokens[$j], $find[$k])) {
138
+                if (!static::match($list->tokens[$j], $find[$k])) {
139 139
                     // This token does not match the pattern.
140 140
                     break;
141 141
                 }
Please login to merge, or discard this patch.
src/Components/WithKeyword.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,11 +38,11 @@
 block discarded – undo
38 38
      */
39 39
     public static function build($component, array $options = [])
40 40
     {
41
-        if (! $component instanceof WithKeyword) {
41
+        if (!$component instanceof WithKeyword) {
42 42
             throw new RuntimeException('Can not build a component that is not a WithKeyword');
43 43
         }
44 44
 
45
-        if (! isset($component->statement)) {
45
+        if (!isset($component->statement)) {
46 46
             throw new RuntimeException('No statement inside WITH');
47 47
         }
48 48
 
Please login to merge, or discard this patch.
src/Statements/WithStatement.php 2 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,6 @@
 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
Please login to merge, or discard this patch.
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.
src/Utils/CLI.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     {
36 36
         foreach ($longopts as $value) {
37 37
             $value = rtrim($value, ':');
38
-            if (! isset($params[$value])) {
38
+            if (!isset($params[$value])) {
39 39
                 continue;
40 40
             }
41 41
 
@@ -83,11 +83,11 @@  discard block
 block discarded – undo
83 83
         }
84 84
 
85 85
         $this->mergeLongOpts($params, $longopts);
86
-        if (! isset($params['f'])) {
86
+        if (!isset($params['f'])) {
87 87
             $params['f'] = 'cli';
88 88
         }
89 89
 
90
-        if (! in_array($params['f'], ['html', 'cli', 'text'])) {
90
+        if (!in_array($params['f'], ['html', 'cli', 'text'])) {
91 91
             echo "ERROR: Invalid value for format!\n";
92 92
 
93 93
             return false;
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             return 0;
113 113
         }
114 114
 
115
-        if (! isset($params['q'])) {
115
+        if (!isset($params['q'])) {
116 116
             $stdIn = $this->readStdin();
117 117
 
118 118
             if ($stdIn) {
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
             Context::load($params['c']);
189 189
         }
190 190
 
191
-        if (! isset($params['q'])) {
191
+        if (!isset($params['q'])) {
192 192
             $stdIn = $this->readStdin();
193 193
 
194 194
             if ($stdIn) {
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
             return 0;
265 265
         }
266 266
 
267
-        if (! isset($params['q'])) {
267
+        if (!isset($params['q'])) {
268 268
             $stdIn = $this->readStdin();
269 269
 
270 270
             if ($stdIn) {
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
@@ -278,7 +278,7 @@
 block discarded – undo
278 278
     public static function build($component, array $options = [])
279 279
     {
280 280
         if ($component->dest instanceof Expression) {
281
-            $columns = ! empty($component->columns) ? '(`' . implode('`, `', $component->columns) . '`)' : '';
281
+            $columns = !empty($component->columns) ? '(`' . implode('`, `', $component->columns) . '`)' : '';
282 282
 
283 283
             return $component->dest . $columns;
284 284
         }
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
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
             }
196 196
         }
197 197
 
198
-        if (! empty($expr->type)) {
198
+        if (!empty($expr->type)) {
199 199
             $ret[] = $expr;
200 200
         }
201 201
 
@@ -215,9 +215,9 @@  discard block
 block discarded – undo
215 215
         $ret = [];
216 216
         foreach ($component as $c) {
217 217
             $ret[] = array_search($c->type, static::$JOINS) . ' ' . $c->expr
218
-                . (! empty($c->on)
218
+                . (!empty($c->on)
219 219
                     ? ' ON ' . Condition::build($c->on) : '')
220
-                . (! empty($c->using)
220
+                . (!empty($c->using)
221 221
                     ? ' USING ' . ArrayObj::build($c->using) : '');
222 222
         }
223 223
 
Please login to merge, or discard this patch.
src/Components/ArrayObj.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@
 block discarded – undo
181 181
             return implode(', ', $component);
182 182
         }
183 183
 
184
-        if (! empty($component->raw)) {
184
+        if (!empty($component->raw)) {
185 185
             return '(' . implode(', ', $component->raw) . ')';
186 186
         }
187 187
 
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.