Completed
Push — master ( 885755...1f0c92 )
by Maurício
19s queued 16s
created
src/Parsers/RenameOperations.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@
 block discarded – undo
156 156
         }
157 157
 
158 158
         // Last iteration was not saved.
159
-        if (! empty($expr->old)) {
159
+        if (!empty($expr->old)) {
160 160
             $ret[] = $expr;
161 161
         }
162 162
 
Please login to merge, or discard this patch.
src/Parsers/JoinKeywords.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
             }
122 122
         }
123 123
 
124
-        if (! empty($expr->type)) {
124
+        if (!empty($expr->type)) {
125 125
             $ret[] = $expr;
126 126
         }
127 127
 
Please login to merge, or discard this patch.
src/Parsers/FunctionCalls.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
                 if ($token->type === TokenType::Operator && $token->value === '(') {
88 88
                     --$list->idx; // ArrayObj needs to start with `(`
89 89
                     $state = 1;
90
-                    continue;// do not add this token to the name
90
+                    continue; // do not add this token to the name
91 91
                 }
92 92
 
93 93
                 $ret->name .= $token->value;
Please login to merge, or discard this patch.
src/Parsers/GroupKeywords.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
                 ) {
89 89
                     $expr->type = $token->keyword;
90 90
                 } elseif (($token->type === TokenType::Operator) && ($token->value === ',')) {
91
-                    if (! empty($expr->expr)) {
91
+                    if (!empty($expr->expr)) {
92 92
                         $ret[] = $expr;
93 93
                     }
94 94
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         }
102 102
 
103 103
         // Last iteration was not processed.
104
-        if (! empty($expr->expr)) {
104
+        if (!empty($expr->expr)) {
105 105
             $ret[] = $expr;
106 106
         }
107 107
 
Please login to merge, or discard this patch.
src/Parsers/Expressions.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      *
81 81
      * @throws ParserException
82 82
      */
83
-    public static function parse(Parser $parser, TokensList $list, array $options = []): Expression|null
83
+    public static function parse(Parser $parser, TokensList $list, array $options = []): Expression | null
84 84
     {
85 85
         $ret = new Expression();
86 86
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         ];
114 114
 
115 115
         // When a field is parsed, no parentheses are expected.
116
-        if (! empty($options['parseField'])) {
116
+        if (!empty($options['parseField'])) {
117 117
             $options['breakOnParentheses'] = true;
118 118
             $options['field'] = $options['parseField'];
119 119
         }
@@ -140,18 +140,18 @@  discard block
 block discarded – undo
140 140
             }
141 141
 
142 142
             if ($token->type === TokenType::Keyword) {
143
-                if (($brackets > 0) && empty($ret->subquery) && ! empty(Parser::STATEMENT_PARSERS[$token->keyword])) {
143
+                if (($brackets > 0) && empty($ret->subquery) && !empty(Parser::STATEMENT_PARSERS[$token->keyword])) {
144 144
                     // A `(` was previously found and this keyword is the
145 145
                     // beginning of a statement, so this is a subquery.
146 146
                     $ret->subquery = $token->keyword;
147 147
                 } elseif (
148 148
                     ($token->flags & Token::FLAG_KEYWORD_FUNCTION)
149 149
                     && (empty($options['parseField'])
150
-                    && ! $alias)
150
+                    && !$alias)
151 151
                 ) {
152 152
                     $isExpr = true;
153 153
                 } elseif (($token->flags & Token::FLAG_KEYWORD_RESERVED) && ($brackets === 0)) {
154
-                    if (! in_array($token->keyword, self::ALLOWED_KEYWORDS, true)) {
154
+                    if (!in_array($token->keyword, self::ALLOWED_KEYWORDS, true)) {
155 155
                         // A reserved keyword that is not allowed in the
156 156
                         // expression was found so the expression must have
157 157
                         // ended and a new clause is starting.
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
                     }
160 160
 
161 161
                     if ($token->keyword === 'AS') {
162
-                        if (! empty($options['breakOnAlias'])) {
162
+                        if (!empty($options['breakOnAlias'])) {
163 163
                             break;
164 164
                         }
165 165
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
                     $isExpr = true;
185 185
                 } elseif (
186
-                    $brackets === 0 && strlen((string) $ret->expr) > 0 && ! $alias
186
+                    $brackets === 0 && strlen((string) $ret->expr) > 0 && !$alias
187 187
                     && ($ret->table === null || $ret->table === '')
188 188
                 ) {
189 189
                     /* End of expression */
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
                 || (($token->type === TokenType::Operator)
202 202
                 && ($token->value !== '.'))
203 203
             ) {
204
-                if (! empty($options['parseField'])) {
204
+                if (!empty($options['parseField'])) {
205 205
                     break;
206 206
                 }
207 207
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
             }
212 212
 
213 213
             if ($token->type === TokenType::Operator) {
214
-                if (! empty($options['breakOnParentheses']) && (($token->value === '(') || ($token->value === ')'))) {
214
+                if (!empty($options['breakOnParentheses']) && (($token->value === '(') || ($token->value === ')'))) {
215 215
                     // No brackets were expected.
216 216
                     break;
217 217
                 }
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 
236 236
                     --$brackets;
237 237
                     if ($brackets === 0) {
238
-                        if (! empty($options['parenthesesDelimited'])) {
238
+                        if (!empty($options['parenthesesDelimited'])) {
239 239
                             // The current token is the last bracket, the next
240 240
                             // one will be outside the expression.
241 241
                             $ret->expr .= $token->token;
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 
262 262
             if ($alias) {
263 263
                 // An alias is expected (the keyword `AS` was previously found).
264
-                if (! empty($ret->alias)) {
264
+                if (!empty($ret->alias)) {
265 265
                     $parser->error('An alias was previously found.', $token);
266 266
                     break;
267 267
                 }
@@ -275,15 +275,15 @@  discard block
 block discarded – undo
275 275
                     && ($prev[0] === null
276 276
                         || (($prev[0]->type !== TokenType::Operator || $prev[0]->token === ')')
277 277
                             && ($prev[0]->type !== TokenType::Keyword
278
-                                || ! ($prev[0]->flags & Token::FLAG_KEYWORD_RESERVED))))
278
+                                || !($prev[0]->flags & Token::FLAG_KEYWORD_RESERVED))))
279 279
                     && (($prev[1]->type === TokenType::String)
280 280
                         || ($prev[1]->type === TokenType::Symbol
281
-                            && ! ($prev[1]->flags & Token::FLAG_SYMBOL_VARIABLE)
282
-                            && ! ($prev[1]->flags & Token::FLAG_SYMBOL_PARAMETER))
281
+                            && !($prev[1]->flags & Token::FLAG_SYMBOL_VARIABLE)
282
+                            && !($prev[1]->flags & Token::FLAG_SYMBOL_PARAMETER))
283 283
                         || ($prev[1]->type === TokenType::None
284 284
                             && $prev[1]->token !== 'OVER'))
285 285
                 ) {
286
-                    if (! empty($ret->alias)) {
286
+                    if (!empty($ret->alias)) {
287 287
                         $parser->error('An alias was previously found.', $token);
288 288
                         break;
289 289
                     }
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
                     // Found a `.` which means we expect a column name and
315 315
                     // the column name we parsed is actually the table name
316 316
                     // and the table name is actually a database name.
317
-                    if (! empty($ret->database) || $dot) {
317
+                    if (!empty($ret->database) || $dot) {
318 318
                         $parser->error('Unexpected dot.', $token);
319 319
                     }
320 320
 
@@ -331,11 +331,11 @@  discard block
 block discarded – undo
331 331
                         $dot = false;
332 332
                     } else {
333 333
                         // No alias is expected.
334
-                        if (! empty($options['breakOnAlias'])) {
334
+                        if (!empty($options['breakOnAlias'])) {
335 335
                             break;
336 336
                         }
337 337
 
338
-                        if (! empty($ret->alias)) {
338
+                        if (!empty($ret->alias)) {
339 339
                             $parser->error('An alias was previously found.', $token);
340 340
                             break;
341 341
                         }
Please login to merge, or discard this patch.
src/Parsers/Conditions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
                 } else {
116 116
                     // The expression ended.
117 117
                     $expr->expr = trim($expr->expr);
118
-                    if (! empty($expr->expr)) {
118
+                    if (!empty($expr->expr)) {
119 119
                         $ret[] = $expr;
120 120
                     }
121 121
 
@@ -133,13 +133,13 @@  discard block
 block discarded – undo
133 133
             if (
134 134
                 ($token->type === TokenType::Keyword)
135 135
                 && ($token->flags & Token::FLAG_KEYWORD_RESERVED)
136
-                && ! ($token->flags & Token::FLAG_KEYWORD_FUNCTION)
136
+                && !($token->flags & Token::FLAG_KEYWORD_FUNCTION)
137 137
             ) {
138 138
                 if ($token->value === 'BETWEEN') {
139 139
                     $betweenBefore = true;
140 140
                 }
141 141
 
142
-                if ($brackets === 0 && ! in_array($token->value, self::ALLOWED_KEYWORDS, true)) {
142
+                if ($brackets === 0 && !in_array($token->value, self::ALLOWED_KEYWORDS, true)) {
143 143
                     break;
144 144
                 }
145 145
             }
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 
177 177
         // Last iteration was not processed.
178 178
         $expr->expr = trim($expr->expr);
179
-        if (! empty($expr->expr)) {
179
+        if (!empty($expr->expr)) {
180 180
             $ret[] = $expr;
181 181
         }
182 182
 
Please login to merge, or discard this patch.
src/Parsers/OrderKeywords.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
                 ) {
89 89
                     $expr->type = $token->keyword;
90 90
                 } elseif (($token->type === TokenType::Operator) && ($token->value === ',')) {
91
-                    if (! empty($expr->expr)) {
91
+                    if (!empty($expr->expr)) {
92 92
                         $ret[] = $expr;
93 93
                     }
94 94
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         }
102 102
 
103 103
         // Last iteration was not processed.
104
-        if (! empty($expr->expr)) {
104
+        if (!empty($expr->expr)) {
105 105
             $ret[] = $expr;
106 106
         }
107 107
 
Please login to merge, or discard this patch.
src/Parsers/Limits.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
 
88 88
             // Skip if not a number or a bind parameter (?)
89 89
             if (
90
-                ! ($token->type === TokenType::Number
90
+                !($token->type === TokenType::Number
91 91
                     || ($token->type === TokenType::Symbol && ($token->flags & Token::FLAG_SYMBOL_PARAMETER)))
92 92
             ) {
93 93
                 break;
Please login to merge, or discard this patch.
src/Parsers/Keys.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -112,9 +112,9 @@  discard block
 block discarded – undo
112 112
             } elseif ($state === 1) {
113 113
                 if (($token->type === TokenType::Operator) && ($token->value === '(')) {
114 114
                     $positionBeforeSearch = $list->idx;
115
-                    $list->idx++;// Ignore the current token "(" or the search condition will always be true
115
+                    $list->idx++; // Ignore the current token "(" or the search condition will always be true
116 116
                     $nextToken = $list->getNext();
117
-                    $list->idx = $positionBeforeSearch;// Restore the position
117
+                    $list->idx = $positionBeforeSearch; // Restore the position
118 118
 
119 119
                     if ($nextToken !== null && $nextToken->value === '(') {
120 120
                         // Switch to expression mode
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
                 if ($token->type === TokenType::Operator) {
164 164
                     // This got back to here and we reached the end of the expression
165 165
                     if ($token->value === ')') {
166
-                        $state = 4;// go back to state 4 to fetch options
166
+                        $state = 4; // go back to state 4 to fetch options
167 167
                         continue;
168 168
                     }
169 169
 
Please login to merge, or discard this patch.