Passed
Push — master ( e29ed1...a6da77 )
by William
06:09
created
src/Components/Expression.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         ];
205 205
 
206 206
         // When a field is parsed, no parentheses are expected.
207
-        if (! empty($options['parseField'])) {
207
+        if (!empty($options['parseField'])) {
208 208
             $options['breakOnParentheses'] = true;
209 209
             $options['field'] = $options['parseField'];
210 210
         }
@@ -230,14 +230,14 @@  discard block
 block discarded – undo
230 230
             }
231 231
 
232 232
             if ($token->type === Token::TYPE_KEYWORD) {
233
-                if (($brackets > 0) && empty($ret->subquery) && ! empty(Parser::$STATEMENT_PARSERS[$token->keyword])) {
233
+                if (($brackets > 0) && empty($ret->subquery) && !empty(Parser::$STATEMENT_PARSERS[$token->keyword])) {
234 234
                     // A `(` was previously found and this keyword is the
235 235
                     // beginning of a statement, so this is a subquery.
236 236
                     $ret->subquery = $token->keyword;
237 237
                 } elseif (
238 238
                     ($token->flags & Token::FLAG_KEYWORD_FUNCTION)
239 239
                     && (empty($options['parseField'])
240
-                    && ! $alias)
240
+                    && !$alias)
241 241
                 ) {
242 242
                     $isExpr = true;
243 243
                 } elseif (($token->flags & Token::FLAG_KEYWORD_RESERVED) && ($brackets === 0)) {
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
                     }
250 250
 
251 251
                     if ($token->keyword === 'AS') {
252
-                        if (! empty($options['breakOnAlias'])) {
252
+                        if (!empty($options['breakOnAlias'])) {
253 253
                             break;
254 254
                         }
255 255
 
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
                     }
273 273
 
274 274
                     $isExpr = true;
275
-                } elseif ($brackets === 0 && strlen((string) $ret->expr) > 0 && ! $alias) {
275
+                } elseif ($brackets === 0 && strlen((string) $ret->expr) > 0 && !$alias) {
276 276
                     /* End of expression */
277 277
                     break;
278 278
                 }
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
                 || (($token->type === Token::TYPE_OPERATOR)
289 289
                 && ($token->value !== '.'))
290 290
             ) {
291
-                if (! empty($options['parseField'])) {
291
+                if (!empty($options['parseField'])) {
292 292
                     break;
293 293
                 }
294 294
 
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
             }
299 299
 
300 300
             if ($token->type === Token::TYPE_OPERATOR) {
301
-                if (! empty($options['breakOnParentheses']) && (($token->value === '(') || ($token->value === ')'))) {
301
+                if (!empty($options['breakOnParentheses']) && (($token->value === '(') || ($token->value === ')'))) {
302 302
                     // No brackets were expected.
303 303
                     break;
304 304
                 }
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 
323 323
                     --$brackets;
324 324
                     if ($brackets === 0) {
325
-                        if (! empty($options['parenthesesDelimited'])) {
325
+                        if (!empty($options['parenthesesDelimited'])) {
326 326
                             // The current token is the last bracket, the next
327 327
                             // one will be outside the expression.
328 328
                             $ret->expr .= $token->token;
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 
349 349
             if ($alias) {
350 350
                 // An alias is expected (the keyword `AS` was previously found).
351
-                if (! empty($ret->alias)) {
351
+                if (!empty($ret->alias)) {
352 352
                     $parser->error('An alias was previously found.', $token);
353 353
                     break;
354 354
                 }
@@ -362,13 +362,13 @@  discard block
 block discarded – undo
362 362
                     && ($prev[0] === null
363 363
                         || (($prev[0]->type !== Token::TYPE_OPERATOR || $prev[0]->token === ')')
364 364
                             && ($prev[0]->type !== Token::TYPE_KEYWORD
365
-                                || ! ($prev[0]->flags & Token::FLAG_KEYWORD_RESERVED))))
365
+                                || !($prev[0]->flags & Token::FLAG_KEYWORD_RESERVED))))
366 366
                     && (($prev[1]->type === Token::TYPE_STRING)
367 367
                         || ($prev[1]->type === Token::TYPE_SYMBOL
368
-                            && ! ($prev[1]->flags & Token::FLAG_SYMBOL_VARIABLE))
368
+                            && !($prev[1]->flags & Token::FLAG_SYMBOL_VARIABLE))
369 369
                         || ($prev[1]->type === Token::TYPE_NONE))
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
                     }
@@ -388,12 +388,12 @@  discard block
 block discarded – undo
388 388
 
389 389
                     $ret->expr .= $token->token;
390 390
                 }
391
-            } elseif (! $isExpr) {
391
+            } elseif (!$isExpr) {
392 392
                 if (($token->type === Token::TYPE_OPERATOR) && ($token->value === '.')) {
393 393
                     // Found a `.` which means we expect a column name and
394 394
                     // the column name we parsed is actually the table name
395 395
                     // and the table name is actually a database name.
396
-                    if (! empty($ret->database) || $dot) {
396
+                    if (!empty($ret->database) || $dot) {
397 397
                         $parser->error('Unexpected dot.', $token);
398 398
                     }
399 399
 
@@ -410,11 +410,11 @@  discard block
 block discarded – undo
410 410
                         $dot = false;
411 411
                     } else {
412 412
                         // No alias is expected.
413
-                        if (! empty($options['breakOnAlias'])) {
413
+                        if (!empty($options['breakOnAlias'])) {
414 414
                             break;
415 415
                         }
416 416
 
417
-                        if (! empty($ret->alias)) {
417
+                        if (!empty($ret->alias)) {
418 418
                             $parser->error('An alias was previously found.', $token);
419 419
                             break;
420 420
                         }
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
             $ret = implode('.', Context::escape($fields));
473 473
         }
474 474
 
475
-        if (! empty($component->alias)) {
475
+        if (!empty($component->alias)) {
476 476
             $ret .= ' AS ' . Context::escape($component->alias);
477 477
         }
478 478
 
Please login to merge, or discard this patch.