Passed
Push — master ( da08ab...de8636 )
by William
13:04
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   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
         ];
203 203
 
204 204
         // When a field is parsed, no parentheses are expected.
205
-        if (! empty($options['parseField'])) {
205
+        if (!empty($options['parseField'])) {
206 206
             $options['breakOnParentheses'] = true;
207 207
             $options['field'] = $options['parseField'];
208 208
         }
@@ -229,14 +229,14 @@  discard block
 block discarded – undo
229 229
             }
230 230
 
231 231
             if ($token->type === Token::TYPE_KEYWORD) {
232
-                if (($brackets > 0) && empty($ret->subquery) && ! empty(Parser::$statementParsers[$token->keyword])) {
232
+                if (($brackets > 0) && empty($ret->subquery) && !empty(Parser::$statementParsers[$token->keyword])) {
233 233
                     // A `(` was previously found and this keyword is the
234 234
                     // beginning of a statement, so this is a subquery.
235 235
                     $ret->subquery = $token->keyword;
236 236
                 } elseif (
237 237
                     ($token->flags & Token::FLAG_KEYWORD_FUNCTION)
238 238
                     && (empty($options['parseField'])
239
-                    && ! $alias)
239
+                    && !$alias)
240 240
                 ) {
241 241
                     $isExpr = true;
242 242
                 } elseif (($token->flags & Token::FLAG_KEYWORD_RESERVED) && ($brackets === 0)) {
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
                     }
249 249
 
250 250
                     if ($token->keyword === 'AS') {
251
-                        if (! empty($options['breakOnAlias'])) {
251
+                        if (!empty($options['breakOnAlias'])) {
252 252
                             break;
253 253
                         }
254 254
 
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
                     }
272 272
 
273 273
                     $isExpr = true;
274
-                } elseif ($brackets === 0 && strlen((string) $ret->expr) > 0 && ! $alias) {
274
+                } elseif ($brackets === 0 && strlen((string) $ret->expr) > 0 && !$alias) {
275 275
                     /* End of expression */
276 276
                     break;
277 277
                 }
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
                 || (($token->type === Token::TYPE_OPERATOR)
288 288
                 && ($token->value !== '.'))
289 289
             ) {
290
-                if (! empty($options['parseField'])) {
290
+                if (!empty($options['parseField'])) {
291 291
                     break;
292 292
                 }
293 293
 
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
             }
298 298
 
299 299
             if ($token->type === Token::TYPE_OPERATOR) {
300
-                if (! empty($options['breakOnParentheses']) && (($token->value === '(') || ($token->value === ')'))) {
300
+                if (!empty($options['breakOnParentheses']) && (($token->value === '(') || ($token->value === ')'))) {
301 301
                     // No brackets were expected.
302 302
                     break;
303 303
                 }
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 
322 322
                     --$brackets;
323 323
                     if ($brackets === 0) {
324
-                        if (! empty($options['parenthesesDelimited'])) {
324
+                        if (!empty($options['parenthesesDelimited'])) {
325 325
                             // The current token is the last bracket, the next
326 326
                             // one will be outside the expression.
327 327
                             $ret->expr .= $token->token;
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 
348 348
             if ($alias) {
349 349
                 // An alias is expected (the keyword `AS` was previously found).
350
-                if (! empty($ret->alias)) {
350
+                if (!empty($ret->alias)) {
351 351
                     $parser->error('An alias was previously found.', $token);
352 352
                     break;
353 353
                 }
@@ -361,14 +361,14 @@  discard block
 block discarded – undo
361 361
                     && ($prev[0] === null
362 362
                         || (($prev[0]->type !== Token::TYPE_OPERATOR || $prev[0]->token === ')')
363 363
                             && ($prev[0]->type !== Token::TYPE_KEYWORD
364
-                                || ! ($prev[0]->flags & Token::FLAG_KEYWORD_RESERVED))))
364
+                                || !($prev[0]->flags & Token::FLAG_KEYWORD_RESERVED))))
365 365
                     && (($prev[1]->type === Token::TYPE_STRING)
366 366
                         || ($prev[1]->type === Token::TYPE_SYMBOL
367
-                            && ! ($prev[1]->flags & Token::FLAG_SYMBOL_VARIABLE))
367
+                            && !($prev[1]->flags & Token::FLAG_SYMBOL_VARIABLE))
368 368
                         || ($prev[1]->type === Token::TYPE_NONE
369 369
                             && $prev[1]->token !== 'OVER'))
370 370
                 ) {
371
-                    if (! empty($ret->alias)) {
371
+                    if (!empty($ret->alias)) {
372 372
                         $parser->error('An alias was previously found.', $token);
373 373
                         break;
374 374
                     }
@@ -394,12 +394,12 @@  discard block
 block discarded – undo
394 394
 
395 395
                     $ret->expr .= $token->token;
396 396
                 }
397
-            } elseif (! $isExpr) {
397
+            } elseif (!$isExpr) {
398 398
                 if (($token->type === Token::TYPE_OPERATOR) && ($token->value === '.')) {
399 399
                     // Found a `.` which means we expect a column name and
400 400
                     // the column name we parsed is actually the table name
401 401
                     // and the table name is actually a database name.
402
-                    if (! empty($ret->database) || $dot) {
402
+                    if (!empty($ret->database) || $dot) {
403 403
                         $parser->error('Unexpected dot.', $token);
404 404
                     }
405 405
 
@@ -416,11 +416,11 @@  discard block
 block discarded – undo
416 416
                         $dot = false;
417 417
                     } else {
418 418
                         // No alias is expected.
419
-                        if (! empty($options['breakOnAlias'])) {
419
+                        if (!empty($options['breakOnAlias'])) {
420 420
                             break;
421 421
                         }
422 422
 
423
-                        if (! empty($ret->alias)) {
423
+                        if (!empty($ret->alias)) {
424 424
                             $parser->error('An alias was previously found.', $token);
425 425
                             break;
426 426
                         }
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
             $ret = implode('.', Context::escapeAll($fields));
476 476
         }
477 477
 
478
-        if (! empty($component->alias)) {
478
+        if (!empty($component->alias)) {
479 479
             $ret .= ' AS ' . Context::escape($component->alias);
480 480
         }
481 481
 
Please login to merge, or discard this patch.