Passed
Push — master ( f9c7db...6aac9c )
by William
14:46 queued 11:57
created
src/Components/AlterOperation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
                     } elseif (($token->value === ',') && ($brackets === 0)) {
425 425
                         break;
426 426
                     }
427
-                } elseif (! self::checkIfTokenQuotedSymbol($token)) {
427
+                } elseif (!self::checkIfTokenQuotedSymbol($token)) {
428 428
                     // If the current token is "SET" or "ENUM", we want to avoid the token between their parenthesis in
429 429
                     // the unknown tokens.
430 430
                     if (in_array($token->value, ['SET', 'ENUM'], true)) {
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
                             );
444 444
                             break;
445 445
                         }
446
-                    } elseif (! empty(Parser::$statementParsers[$token->value])) {
446
+                    } elseif (!empty(Parser::$statementParsers[$token->value])) {
447 447
                         // We have reached the end of ALTER operation and suddenly found
448 448
                         // a start to new statement, but have not found a delimiter between them
449 449
                         $parser->error(
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
                     } elseif (
455 455
                         (array_key_exists($arrayKey, self::$databaseOptions)
456 456
                         || array_key_exists($arrayKey, self::$tableOptions))
457
-                        && ! self::checkIfColumnDefinitionKeyword($arrayKey)
457
+                        && !self::checkIfColumnDefinitionKeyword($arrayKey)
458 458
                     ) {
459 459
                         // This alter operation has finished, which means a comma
460 460
                         // was missing before start of new alter operation
Please login to merge, or discard this patch.
src/Components/Expression.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      *
158 158
      * @throws ParserException
159 159
      */
160
-    public static function parse(Parser $parser, TokensList $list, array $options = []): Expression|null
160
+    public static function parse(Parser $parser, TokensList $list, array $options = []): Expression | null
161 161
     {
162 162
         $ret = new static();
163 163
 
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
         ];
201 201
 
202 202
         // When a field is parsed, no parentheses are expected.
203
-        if (! empty($options['parseField'])) {
203
+        if (!empty($options['parseField'])) {
204 204
             $options['breakOnParentheses'] = true;
205 205
             $options['field'] = $options['parseField'];
206 206
         }
@@ -227,14 +227,14 @@  discard block
 block discarded – undo
227 227
             }
228 228
 
229 229
             if ($token->type === Token::TYPE_KEYWORD) {
230
-                if (($brackets > 0) && empty($ret->subquery) && ! empty(Parser::$statementParsers[$token->keyword])) {
230
+                if (($brackets > 0) && empty($ret->subquery) && !empty(Parser::$statementParsers[$token->keyword])) {
231 231
                     // A `(` was previously found and this keyword is the
232 232
                     // beginning of a statement, so this is a subquery.
233 233
                     $ret->subquery = $token->keyword;
234 234
                 } elseif (
235 235
                     ($token->flags & Token::FLAG_KEYWORD_FUNCTION)
236 236
                     && (empty($options['parseField'])
237
-                    && ! $alias)
237
+                    && !$alias)
238 238
                 ) {
239 239
                     $isExpr = true;
240 240
                 } elseif (($token->flags & Token::FLAG_KEYWORD_RESERVED) && ($brackets === 0)) {
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
                     }
247 247
 
248 248
                     if ($token->keyword === 'AS') {
249
-                        if (! empty($options['breakOnAlias'])) {
249
+                        if (!empty($options['breakOnAlias'])) {
250 250
                             break;
251 251
                         }
252 252
 
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
                     }
270 270
 
271 271
                     $isExpr = true;
272
-                } elseif ($brackets === 0 && strlen((string) $ret->expr) > 0 && ! $alias) {
272
+                } elseif ($brackets === 0 && strlen((string) $ret->expr) > 0 && !$alias) {
273 273
                     /* End of expression */
274 274
                     break;
275 275
                 }
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
                 || (($token->type === Token::TYPE_OPERATOR)
286 286
                 && ($token->value !== '.'))
287 287
             ) {
288
-                if (! empty($options['parseField'])) {
288
+                if (!empty($options['parseField'])) {
289 289
                     break;
290 290
                 }
291 291
 
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
             }
296 296
 
297 297
             if ($token->type === Token::TYPE_OPERATOR) {
298
-                if (! empty($options['breakOnParentheses']) && (($token->value === '(') || ($token->value === ')'))) {
298
+                if (!empty($options['breakOnParentheses']) && (($token->value === '(') || ($token->value === ')'))) {
299 299
                     // No brackets were expected.
300 300
                     break;
301 301
                 }
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 
320 320
                     --$brackets;
321 321
                     if ($brackets === 0) {
322
-                        if (! empty($options['parenthesesDelimited'])) {
322
+                        if (!empty($options['parenthesesDelimited'])) {
323 323
                             // The current token is the last bracket, the next
324 324
                             // one will be outside the expression.
325 325
                             $ret->expr .= $token->token;
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 
346 346
             if ($alias) {
347 347
                 // An alias is expected (the keyword `AS` was previously found).
348
-                if (! empty($ret->alias)) {
348
+                if (!empty($ret->alias)) {
349 349
                     $parser->error('An alias was previously found.', $token);
350 350
                     break;
351 351
                 }
@@ -359,14 +359,14 @@  discard block
 block discarded – undo
359 359
                     && ($prev[0] === null
360 360
                         || (($prev[0]->type !== Token::TYPE_OPERATOR || $prev[0]->token === ')')
361 361
                             && ($prev[0]->type !== Token::TYPE_KEYWORD
362
-                                || ! ($prev[0]->flags & Token::FLAG_KEYWORD_RESERVED))))
362
+                                || !($prev[0]->flags & Token::FLAG_KEYWORD_RESERVED))))
363 363
                     && (($prev[1]->type === Token::TYPE_STRING)
364 364
                         || ($prev[1]->type === Token::TYPE_SYMBOL
365
-                            && ! ($prev[1]->flags & Token::FLAG_SYMBOL_VARIABLE))
365
+                            && !($prev[1]->flags & Token::FLAG_SYMBOL_VARIABLE))
366 366
                         || ($prev[1]->type === Token::TYPE_NONE
367 367
                             && $prev[1]->token !== 'OVER'))
368 368
                 ) {
369
-                    if (! empty($ret->alias)) {
369
+                    if (!empty($ret->alias)) {
370 370
                         $parser->error('An alias was previously found.', $token);
371 371
                         break;
372 372
                     }
@@ -392,12 +392,12 @@  discard block
 block discarded – undo
392 392
 
393 393
                     $ret->expr .= $token->token;
394 394
                 }
395
-            } elseif (! $isExpr) {
395
+            } elseif (!$isExpr) {
396 396
                 if (($token->type === Token::TYPE_OPERATOR) && ($token->value === '.')) {
397 397
                     // Found a `.` which means we expect a column name and
398 398
                     // the column name we parsed is actually the table name
399 399
                     // and the table name is actually a database name.
400
-                    if (! empty($ret->database) || $dot) {
400
+                    if (!empty($ret->database) || $dot) {
401 401
                         $parser->error('Unexpected dot.', $token);
402 402
                     }
403 403
 
@@ -414,11 +414,11 @@  discard block
 block discarded – undo
414 414
                         $dot = false;
415 415
                     } else {
416 416
                         // No alias is expected.
417
-                        if (! empty($options['breakOnAlias'])) {
417
+                        if (!empty($options['breakOnAlias'])) {
418 418
                             break;
419 419
                         }
420 420
 
421
-                        if (! empty($ret->alias)) {
421
+                        if (!empty($ret->alias)) {
422 422
                             $parser->error('An alias was previously found.', $token);
423 423
                             break;
424 424
                         }
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
             $ret = implode('.', Context::escapeAll($fields));
474 474
         }
475 475
 
476
-        if (! empty($component->alias)) {
476
+        if (!empty($component->alias)) {
477 477
             $ret .= ' AS ' . Context::escape($component->alias);
478 478
         }
479 479
 
Please login to merge, or discard this patch.