Passed
Push — master ( ab0866...eccca0 )
by Maurício
02:57 queued 12s
created
src/Components/DataType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      * @param TokensList           $list    the list of tokens that are being parsed
95 95
      * @param array<string, mixed> $options parameters for parsing
96 96
      */
97
-    public static function parse(Parser $parser, TokensList $list, array $options = []): DataType|null
97
+    public static function parse(Parser $parser, TokensList $list, array $options = []): DataType | null
98 98
     {
99 99
         $ret = new static();
100 100
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
             if ($state === 0) {
126 126
                 $ret->name = strtoupper((string) $token->value);
127
-                if (($token->type !== Token::TYPE_KEYWORD) || (! ($token->flags & Token::FLAG_KEYWORD_DATA_TYPE))) {
127
+                if (($token->type !== Token::TYPE_KEYWORD) || (!($token->flags & Token::FLAG_KEYWORD_DATA_TYPE))) {
128 128
                     $parser->error('Unrecognized data type.', $token);
129 129
                 }
130 130
 
Please login to merge, or discard this patch.
src/Components/ArrayObj.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
      *
50 50
      * @return ArrayObj|Component[]
51 51
      */
52
-    public static function parse(Parser $parser, TokensList $list, array $options = []): ArrayObj|array
52
+    public static function parse(Parser $parser, TokensList $list, array $options = []): ArrayObj | array
53 53
     {
54 54
         $ret = empty($options['type']) ? new static() : [];
55 55
 
Please login to merge, or discard this patch.
src/Context.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -358,13 +358,13 @@  discard block
 block discarded – undo
358 358
      *
359 359
      * @param bool $isReserved checks if the keyword is reserved
360 360
      */
361
-    public static function isKeyword(string $string, bool $isReserved = false): int|null
361
+    public static function isKeyword(string $string, bool $isReserved = false): int | null
362 362
     {
363 363
         $upperString = strtoupper($string);
364 364
 
365 365
         if (
366
-            ! isset(static::$keywords[$upperString])
367
-            || ($isReserved && ! (static::$keywords[$upperString] & Token::FLAG_KEYWORD_RESERVED))
366
+            !isset(static::$keywords[$upperString])
367
+            || ($isReserved && !(static::$keywords[$upperString] & Token::FLAG_KEYWORD_RESERVED))
368 368
         ) {
369 369
             return null;
370 370
         }
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
     /**
376 376
      * Checks if the given string is an operator and returns the appropriate flag for the operator.
377 377
      */
378
-    public static function isOperator(string $string): int|null
378
+    public static function isOperator(string $string): int | null
379 379
     {
380 380
         return static::$operators[$string] ?? null;
381 381
     }
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
      *
394 394
      * @return int|null the appropriate flag for the comment type
395 395
      */
396
-    public static function isComment(string $string, bool $end = false): int|null
396
+    public static function isComment(string $string, bool $end = false): int | null
397 397
     {
398 398
         if ($string === '') {
399 399
             return null;
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
      *
457 457
      * @return int|null the appropriate flag for the symbol type
458 458
      */
459
-    public static function isSymbol(string $string): int|null
459
+    public static function isSymbol(string $string): int | null
460 460
     {
461 461
         if ($string === '') {
462 462
             return null;
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
      *
485 485
      * @return int|null the appropriate flag for the string type
486 486
      */
487
-    public static function isString(string $string): int|null
487
+    public static function isString(string $string): int | null
488 488
     {
489 489
         if ($string === '') {
490 490
             return null;
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
             $context = self::$contextPrefix . $context;
539 539
         }
540 540
 
541
-        if (! class_exists($context)) {
541
+        if (!class_exists($context)) {
542 542
             return false;
543 543
         }
544 544
 
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
      *
561 561
      * @return string|null The loaded context. `null` if no context was loaded.
562 562
      */
563
-    public static function loadClosest(string $context = ''): string|null
563
+    public static function loadClosest(string $context = ''): string | null
564 564
     {
565 565
         $length = strlen($context);
566 566
         for ($i = $length; $i > 0;) {
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
                 $i -= 2;
575 575
                 $part = substr($context, $i, 2);
576 576
                 /* No more numeric parts to strip */
577
-                if (! is_numeric($part)) {
577
+                if (!is_numeric($part)) {
578 578
                     break 2;
579 579
                 }
580 580
             } while (intval($part) === 0 && $i > 0);
@@ -675,7 +675,7 @@  discard block
 block discarded – undo
675 675
     public static function escape(string $str, string $quote = '`'): string
676 676
     {
677 677
         if (
678
-            (static::$mode & self::SQL_MODE_NO_ENCLOSING_QUOTES) && ! (
678
+            (static::$mode & self::SQL_MODE_NO_ENCLOSING_QUOTES) && !(
679 679
                 static::isKeyword($str, true) || self::doesIdentifierRequireQuoting($str)
680 680
             )
681 681
         ) {
@@ -722,7 +722,7 @@  discard block
 block discarded – undo
722 722
      *
723 723
      * @return bool false on empty param, true/false on given constant/int value
724 724
      */
725
-    public static function hasMode(int|null $flag = null): bool
725
+    public static function hasMode(int | null $flag = null): bool
726 726
     {
727 727
         if (empty($flag)) {
728 728
             return false;
Please login to merge, or discard this patch.