Passed
Pull Request — master (#521)
by
unknown
08:41 queued 05:54
created
src/Statements/SelectStatement.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -391,28 +391,28 @@  discard block
 block discarded – undo
391 391
         $expressions = $this->from;
392 392
 
393 393
         // Adding expressions from JOIN.
394
-        if (! empty($this->join)) {
394
+        if (!empty($this->join)) {
395 395
             foreach ($this->join as $join) {
396 396
                 $expressions[] = $join->expr;
397 397
             }
398 398
         }
399 399
 
400 400
         foreach ($expressions as $expr) {
401
-            if (! isset($expr->table) || ($expr->table === '')) {
401
+            if (!isset($expr->table) || ($expr->table === '')) {
402 402
                 continue;
403 403
             }
404 404
 
405 405
             $thisDb = isset($expr->database) && ($expr->database !== '') ?
406 406
                 $expr->database : $database;
407 407
 
408
-            if (! isset($retval[$thisDb])) {
408
+            if (!isset($retval[$thisDb])) {
409 409
                 $retval[$thisDb] = [
410 410
                     'alias' => null,
411 411
                     'tables' => [],
412 412
                 ];
413 413
             }
414 414
 
415
-            if (! isset($retval[$thisDb]['tables'][$expr->table])) {
415
+            if (!isset($retval[$thisDb]['tables'][$expr->table])) {
416 416
                 $retval[$thisDb]['tables'][$expr->table] = [
417 417
                     'alias' => isset($expr->alias) && ($expr->alias !== '') ?
418 418
                         $expr->alias : null,
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
                 ];
421 421
             }
422 422
 
423
-            if (! isset($tables[$thisDb])) {
423
+            if (!isset($tables[$thisDb])) {
424 424
                 $tables[$thisDb] = [];
425 425
             }
426 426
 
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
         }
429 429
 
430 430
         foreach ($this->expr as $expr) {
431
-            if (! isset($expr->column, $expr->alias) || ($expr->column === '') || ($expr->alias === '')) {
431
+            if (!isset($expr->column, $expr->alias) || ($expr->column === '') || ($expr->alias === '')) {
432 432
                 continue;
433 433
             }
434 434
 
Please login to merge, or discard this patch.
src/Components/IndexHint.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,17 +20,17 @@  discard block
 block discarded – undo
20 20
     /**
21 21
      * The type of hint (USE/FORCE/IGNORE)
22 22
      */
23
-    public string|null $type;
23
+    public string | null $type;
24 24
 
25 25
     /**
26 26
      * What the hint is for (INDEX/KEY)
27 27
      */
28
-    public string|null $indexOrKey;
28
+    public string | null $indexOrKey;
29 29
 
30 30
     /**
31 31
      * The clause for which this hint is (JOIN/ORDER BY/GROUP BY)
32 32
      */
33
-    public string|null $for;
33
+    public string | null $for;
34 34
 
35 35
     /**
36 36
      * List of indexes in this hint
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
      * @param Expression[] $indexes    List of indexes in this hint
47 47
      */
48 48
     public function __construct(
49
-        string|null $type = null,
50
-        string|null $indexOrKey = null,
51
-        string|null $for = null,
49
+        string | null $type = null,
50
+        string | null $indexOrKey = null,
51
+        string | null $for = null,
52 52
         array $indexes = []
53 53
     ) {
54 54
         $this->type = $type;
Please login to merge, or discard this patch.
src/Statements/ReplaceStatement.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      *
64 64
      * @var ArrayObj[]|null
65 65
      */
66
-    public array|null $values = null;
66
+    public array | null $values = null;
67 67
 
68 68
     /**
69 69
      * If SET clause is present
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      *
72 72
      * @var SetOperation[]|null
73 73
      */
74
-    public array|null $set = null;
74
+    public array | null $set = null;
75 75
 
76 76
     /**
77 77
      * If SELECT clause is present
Please login to merge, or discard this patch.
tests/Lexer/ContextTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      * Test for loading closest SQL context
31 31
      */
32 32
     #[DataProvider('contextLoadingProvider')]
33
-    public function testLoadClosest(string $context, string|null $expected): void
33
+    public function testLoadClosest(string $context, string | null $expected): void
34 34
     {
35 35
         $this->assertEquals($expected, Context::loadClosest($context));
36 36
         if ($expected !== null) {
Please login to merge, or discard this patch.
tests/Misc/UtfStringTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
      * Test access to string.
87 87
      */
88 88
     #[DataProvider('utf8StringsProvider')]
89
-    public function testAccess(string $text, string|null $pos10, string|null $pos20): void
89
+    public function testAccess(string $text, string | null $pos10, string | null $pos20): void
90 90
     {
91 91
         $str = new UtfString($text);
92 92
         $this->assertEquals($pos10, $str->offsetGet(10));
Please login to merge, or discard this patch.
src/Statements/InsertStatement.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      *
78 78
      * @var ArrayObj[]|null
79 79
      */
80
-    public array|null $values = null;
80
+    public array | null $values = null;
81 81
 
82 82
     /**
83 83
      * If SET clause is present
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      *
86 86
      * @var SetOperation[]|null
87 87
      */
88
-    public array|null $set = null;
88
+    public array | null $set = null;
89 89
 
90 90
     /**
91 91
      * If SELECT clause is present
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      *
110 110
      * @var SetOperation[]|null
111 111
      */
112
-    public array|null $onDuplicateSet = null;
112
+    public array | null $onDuplicateSet = null;
113 113
 
114 114
     public function build(): string
115 115
     {
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/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.