Passed
Pull Request — master (#505)
by
unknown
04:43 queued 01:55
created
src/Components/AlterOperation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
                     } elseif (($token->value === ',') && ($brackets === 0)) {
408 408
                         break;
409 409
                     }
410
-                } elseif (! self::checkIfTokenQuotedSymbol($token)) {
410
+                } elseif (!self::checkIfTokenQuotedSymbol($token)) {
411 411
                     // If the current token is "SET" or "ENUM", we want to avoid the token between their parenthesis in
412 412
                     // the unknown tokens.
413 413
                     if (in_array($token->value, ['SET', 'ENUM'], true)) {
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
                             );
427 427
                             break;
428 428
                         }
429
-                    } elseif (! empty(Parser::STATEMENT_PARSERS[$token->value])) {
429
+                    } elseif (!empty(Parser::STATEMENT_PARSERS[$token->value])) {
430 430
                         // We have reached the end of ALTER operation and suddenly found
431 431
                         // a start to new statement, but have not found a delimiter between them
432 432
                         $parser->error(
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
                     } elseif (
438 438
                         (array_key_exists($arrayKey, self::DATABASE_OPTIONS)
439 439
                         || array_key_exists($arrayKey, self::TABLE_OPTIONS))
440
-                        && ! self::checkIfColumnDefinitionKeyword($arrayKey)
440
+                        && !self::checkIfColumnDefinitionKeyword($arrayKey)
441 441
                     ) {
442 442
                         // This alter operation has finished, which means a comma
443 443
                         // was missing before start of new alter operation
Please login to merge, or discard this patch.
src/Statement.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      * @param Parser|null     $parser the instance that requests parsing
89 89
      * @param TokensList|null $list   the list of tokens to be parsed
90 90
      */
91
-    public function __construct(Parser|null $parser = null, TokensList|null $list = null)
91
+    public function __construct(Parser | null $parser = null, TokensList | null $list = null)
92 92
     {
93 93
         if (($parser === null) || ($list === null)) {
94 94
             return;
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 
166 166
             // Checking if this field was already built.
167 167
             if ($type & 1) {
168
-                if (! empty($built[$field])) {
168
+                if (!empty($built[$field])) {
169 169
                     continue;
170 170
                 }
171 171
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
             }
179 179
 
180 180
             // Checking if the result of the builder should be added.
181
-            if (! ($type & 1)) {
181
+            if (!($type & 1)) {
182 182
                 continue;
183 183
             }
184 184
 
@@ -304,8 +304,8 @@  discard block
 block discarded – undo
304 304
             $options = [];
305 305
 
306 306
             // Looking for duplicated clauses.
307
-            if (! empty(Parser::KEYWORD_PARSERS[$token->value]) || ! empty(Parser::STATEMENT_PARSERS[$token->value])) {
308
-                if (! empty($parsedClauses[$token->value])) {
307
+            if (!empty(Parser::KEYWORD_PARSERS[$token->value]) || !empty(Parser::STATEMENT_PARSERS[$token->value])) {
308
+                if (!empty($parsedClauses[$token->value])) {
309 309
                     $parser->error('This type of clause was previously parsed.', $token);
310 310
                     break;
311 311
                 }
@@ -318,18 +318,18 @@  discard block
 block discarded – undo
318 318
             // but it might be the beginning of a statement of truncate,
319 319
             // so let the value use the keyword field for truncate type.
320 320
             $tokenValue = in_array($token->keyword, ['TRUNCATE']) ? $token->keyword : $token->value;
321
-            if (! empty(Parser::KEYWORD_PARSERS[$tokenValue]) && $list->idx < $list->count) {
321
+            if (!empty(Parser::KEYWORD_PARSERS[$tokenValue]) && $list->idx < $list->count) {
322 322
                 $class = Parser::KEYWORD_PARSERS[$tokenValue]['class'];
323 323
                 $field = Parser::KEYWORD_PARSERS[$tokenValue]['field'];
324
-                if (! empty(Parser::KEYWORD_PARSERS[$tokenValue]['options'])) {
324
+                if (!empty(Parser::KEYWORD_PARSERS[$tokenValue]['options'])) {
325 325
                     $options = Parser::KEYWORD_PARSERS[$tokenValue]['options'];
326 326
                 }
327 327
             }
328 328
 
329 329
             // Checking if this is the beginning of the statement.
330
-            if (! empty(Parser::STATEMENT_PARSERS[$token->keyword])) {
330
+            if (!empty(Parser::STATEMENT_PARSERS[$token->keyword])) {
331 331
                 if (
332
-                    ! empty(static::$clauses) // Undefined for some statements.
332
+                    !empty(static::$clauses) // Undefined for some statements.
333 333
                     && empty(static::$clauses[$token->value])
334 334
                 ) {
335 335
                     // Some keywords (e.g. `SET`) may be the beginning of a
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
                     break;
345 345
                 }
346 346
 
347
-                if (! $parsedOptions) {
347
+                if (!$parsedOptions) {
348 348
                     if (empty(static::$statementOptions[$token->value])) {
349 349
                         // Skipping keyword because if it is not a option.
350 350
                         ++$list->idx;
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
                 if ($minJoin === 0 && stripos($clauseType, 'JOIN')) {
518 518
                     // First JOIN clause is detected
519 519
                     $minJoin = $maxJoin = $clauseStartIdx;
520
-                } elseif ($minJoin !== 0 && ! stripos($clauseType, 'JOIN')) {
520
+                } elseif ($minJoin !== 0 && !stripos($clauseType, 'JOIN')) {
521 521
                     // After a previous JOIN clause, a non-JOIN clause has been detected
522 522
                     $maxJoin = $lastIdx;
523 523
                 } elseif ($maxJoin < $clauseStartIdx && stripos($clauseType, 'JOIN')) {
Please login to merge, or discard this patch.