Passed
Pull Request — master (#520)
by
unknown
03:37
created
src/Utils/BufferedQuery.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      *
122 122
      * @param bool $end whether the end of the buffer was reached
123 123
      */
124
-    public function extract($end = false): string|false
124
+    public function extract($end = false): string | false
125 125
     {
126 126
         /**
127 127
          * The last parsed position.
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 
314 314
                 // Parsing the delimiter.
315 315
                 $delimiter = '';
316
-                while (($i < $len) && (! Context::isWhitespace($this->query[$i]))) {
316
+                while (($i < $len) && (!Context::isWhitespace($this->query[$i]))) {
317 317
                     $delimiter .= $this->query[$i++];
318 318
                 }
319 319
 
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
 
329 329
                     // Whether this statement should be returned or not.
330 330
                     $ret = '';
331
-                    if (! empty($this->options['parse_delimiter'])) {
331
+                    if (!empty($this->options['parse_delimiter'])) {
332 332
                         // Appending the `DELIMITER` statement that was just
333 333
                         // found to the current statement.
334 334
                         $ret = trim(
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
                 $ret = $this->current;
372 372
 
373 373
                 // If needed, adds a delimiter at the end of the statement.
374
-                if (! empty($this->options['add_delimiter'])) {
374
+                if (!empty($this->options['add_delimiter'])) {
375 375
                     $ret .= $this->delimiter;
376 376
                 }
377 377
 
Please login to merge, or discard this patch.
src/Translator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
      */
66 66
     public static function gettext($msgid): string
67 67
     {
68
-        if (! class_exists(Loader::class, true)) {
68
+        if (!class_exists(Loader::class, true)) {
69 69
             return $msgid;
70 70
         }
71 71
 
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/Components/WithKeyword.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
     public function build(): string
49 49
     {
50
-        if (! isset($this->statement)) {
50
+        if (!isset($this->statement)) {
51 51
             throw new RuntimeException('No statement inside WITH');
52 52
         }
53 53
 
Please login to merge, or discard this patch.
src/Components/IntoKeyword.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -261,7 +261,7 @@
 block discarded – undo
261 261
     public function build(): string
262 262
     {
263 263
         if ($this->dest instanceof Expression) {
264
-            $columns = ! empty($this->columns) ? '(`' . implode('`, `', $this->columns) . '`)' : '';
264
+            $columns = !empty($this->columns) ? '(`' . implode('`, `', $this->columns) . '`)' : '';
265 265
 
266 266
             return $this->dest . $columns;
267 267
         }
Please login to merge, or discard this patch.
src/Components/ParameterDefinition.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@
 block discarded – undo
142 142
     public function build(): string
143 143
     {
144 144
         $tmp = '';
145
-        if (! empty($this->inOut)) {
145
+        if (!empty($this->inOut)) {
146 146
             $tmp .= $this->inOut . ' ';
147 147
         }
148 148
 
Please login to merge, or discard this patch.
src/Components/OptionsArray.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
             if ($lastOption === null) {
110 110
                 $upper = strtoupper($token->token);
111
-                if (! isset($options[$upper])) {
111
+                if (!isset($options[$upper])) {
112 112
                     // There is no option to be processed.
113 113
                     break;
114 114
                 }
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
             }
146 146
 
147 147
             if ($state === 0) {
148
-                if (! is_array($lastOption)) {
148
+                if (!is_array($lastOption)) {
149 149
                     // This is a just keyword option without any value.
150 150
                     // This is the beginning and the end of it.
151 151
                     $ret->options[$lastOptionId] = $token->value;
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
                 $ret->options[$lastOptionId]['expr'] .= $token->token;
223 223
 
224 224
                 if (
225
-                    ! (($token->token === '(') && ($brackets === 1)
225
+                    !(($token->token === '(') && ($brackets === 1)
226 226
                     || (($token->token === ')') && ($brackets === 0)))
227 227
                 ) {
228 228
                     // First pair of brackets is being skipped.
@@ -274,12 +274,12 @@  discard block
 block discarded – undo
274 274
 
275 275
         $options = [];
276 276
         foreach ($this->options as $option) {
277
-            if (! is_array($option)) {
277
+            if (!is_array($option)) {
278 278
                 $options[] = $option;
279 279
             } else {
280 280
                 $options[] = $option['name']
281
-                    . (! empty($option['equals']) ? '=' : ' ')
282
-                    . (! empty($option['expr']) ? $option['expr'] : $option['value']);
281
+                    . (!empty($option['equals']) ? '=' : ' ')
282
+                    . (!empty($option['expr']) ? $option['expr'] : $option['value']);
283 283
             }
284 284
         }
285 285
 
@@ -299,10 +299,10 @@  discard block
 block discarded – undo
299 299
     {
300 300
         foreach ($this->options as $option) {
301 301
             if (is_array($option)) {
302
-                if (! strcasecmp($key, $option['name'])) {
302
+                if (!strcasecmp($key, $option['name'])) {
303 303
                     return $getExpr ? $option['expr'] : $option['value'];
304 304
                 }
305
-            } elseif (! strcasecmp($key, $option)) {
305
+            } elseif (!strcasecmp($key, $option)) {
306 306
                 return true;
307 307
             }
308 308
         }
@@ -321,12 +321,12 @@  discard block
 block discarded – undo
321 321
     {
322 322
         foreach ($this->options as $idx => $option) {
323 323
             if (is_array($option)) {
324
-                if (! strcasecmp($key, $option['name'])) {
324
+                if (!strcasecmp($key, $option['name'])) {
325 325
                     unset($this->options[$idx]);
326 326
 
327 327
                     return true;
328 328
                 }
329
-            } elseif (! strcasecmp($key, $option)) {
329
+            } elseif (!strcasecmp($key, $option)) {
330 330
                 unset($this->options[$idx]);
331 331
 
332 332
                 return true;
Please login to merge, or discard this patch.
src/Components/PartitionDefinition.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -233,7 +233,7 @@
 block discarded – undo
233 233
         return trim(
234 234
             'PARTITION ' . $this->name
235 235
             . (empty($this->type) ? '' : ' VALUES ' . $this->type . ' ' . $this->expr . ' ')
236
-            . (! empty($this->options) && ! empty($this->type) ? '' : ' ')
236
+            . (!empty($this->options) && !empty($this->type) ? '' : ' ')
237 237
             . $this->options . $subpartitions
238 238
         );
239 239
     }
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.