Passed
Pull Request — master (#546)
by Maurício
03:22
created
src/Components/GroupKeyword.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 final class GroupKeyword implements Component
15 15
 {
16 16
     /** @var 'ASC'|'DESC'|null */
17
-    public string|null $type = null;
17
+    public string | null $type = null;
18 18
 
19 19
     /**
20 20
      * The expression that is used for grouping.
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     public $expr;
25 25
 
26 26
     /** @param Expression $expr the expression that we are sorting by */
27
-    public function __construct(Expression|null $expr = null)
27
+    public function __construct(Expression | null $expr = null)
28 28
     {
29 29
         $this->expr = $expr;
30 30
     }
Please login to merge, or discard this patch.
src/Components/CreateDefinition.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -66,11 +66,11 @@  discard block
 block discarded – undo
66 66
      * @param Reference|null    $references   references
67 67
      */
68 68
     public function __construct(
69
-        string|null $name = null,
70
-        OptionsArray|null $options = null,
71
-        DataType|Key|null $type = null,
69
+        string | null $name = null,
70
+        OptionsArray | null $options = null,
71
+        DataType | Key | null $type = null,
72 72
         bool $isConstraint = false,
73
-        Reference|null $references = null,
73
+        Reference | null $references = null,
74 74
     ) {
75 75
         $this->name = $name;
76 76
         $this->options = $options;
@@ -95,16 +95,16 @@  discard block
 block discarded – undo
95 95
             $tmp .= Context::escape($this->name) . ' ';
96 96
         }
97 97
 
98
-        if (! empty($this->type)) {
98
+        if (!empty($this->type)) {
99 99
             $this->type->lowercase = true;
100 100
             $tmp .= $this->type->build() . ' ';
101 101
         }
102 102
 
103
-        if (! empty($this->key)) {
103
+        if (!empty($this->key)) {
104 104
             $tmp .= $this->key . ' ';
105 105
         }
106 106
 
107
-        if (! empty($this->references)) {
107
+        if (!empty($this->references)) {
108 108
             $tmp .= 'REFERENCES ' . $this->references . ' ';
109 109
         }
110 110
 
Please login to merge, or discard this patch.
src/Parseable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,5 +18,5 @@
 block discarded – undo
18 18
      *
19 19
      * @return Component|Component[]|null
20 20
      */
21
-    public static function parse(Parser $parser, TokensList $list, array $options = []): Component|array|null;
21
+    public static function parse(Parser $parser, TokensList $list, array $options = []): Component | array | null;
22 22
 }
Please login to merge, or discard this patch.
src/Parsers/CreateDefinitions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
                     $state = 4;
171 171
                 } elseif ($token->type === TokenType::Symbol || $token->type === TokenType::None) {
172 172
                     $expr->name = $token->value;
173
-                    if (! $expr->isConstraint) {
173
+                    if (!$expr->isConstraint) {
174 174
                         $state = 2;
175 175
                     }
176 176
                 } elseif ($token->type === TokenType::Keyword) {
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 
212 212
                 $state = 5;
213 213
             } else {
214
-                if (! empty($expr->type) || ! empty($expr->key)) {
214
+                if (!empty($expr->type) || !empty($expr->key)) {
215 215
                     $ret[] = $expr;
216 216
                 }
217 217
 
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
         }
232 232
 
233 233
         // Last iteration was not saved.
234
-        if (! empty($expr->type) || ! empty($expr->key)) {
234
+        if (!empty($expr->type) || !empty($expr->key)) {
235 235
             $ret[] = $expr;
236 236
         }
237 237
 
Please login to merge, or discard this patch.
src/Parsers/OptionsArrays.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
             if ($lastOption === null) {
89 89
                 $upper = strtoupper($token->token);
90
-                if (! isset($options[$upper])) {
90
+                if (!isset($options[$upper])) {
91 91
                     // There is no option to be processed.
92 92
                     break;
93 93
                 }
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
             }
125 125
 
126 126
             if ($state === 0) {
127
-                if (! is_array($lastOption)) {
127
+                if (!is_array($lastOption)) {
128 128
                     // This is a just keyword option without any value.
129 129
                     // This is the beginning and the end of it.
130 130
                     $ret->options[$lastOptionId] = $token->value;
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
                 $ret->options[$lastOptionId]['expr'] .= $token->token;
202 202
 
203 203
                 if (
204
-                    ! (($token->token === '(') && ($brackets === 1)
204
+                    !(($token->token === '(') && ($brackets === 1)
205 205
                     || (($token->token === ')') && ($brackets === 0)))
206 206
                 ) {
207 207
                     // First pair of brackets is being skipped.
Please login to merge, or discard this patch.
src/Parsers/ArrayObjs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
      *
28 28
      * @return ArrayObj|Component[]
29 29
      */
30
-    public static function parse(Parser $parser, TokensList $list, array $options = []): ArrayObj|array
30
+    public static function parse(Parser $parser, TokensList $list, array $options = []): ArrayObj | array
31 31
     {
32 32
         $ret = empty($options['type']) ? new ArrayObj() : [];
33 33
 
Please login to merge, or discard this patch.
src/Parsers/AlterOperations.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
                     } elseif (($token->value === ',') && ($brackets === 0)) {
402 402
                         break;
403 403
                     }
404
-                } elseif (! self::checkIfTokenQuotedSymbol($token) && $token->type !== TokenType::String) {
404
+                } elseif (!self::checkIfTokenQuotedSymbol($token) && $token->type !== TokenType::String) {
405 405
                     if (isset(Parser::STATEMENT_PARSERS[$arrayKey]) && Parser::STATEMENT_PARSERS[$arrayKey] !== '') {
406 406
                         $list->idx++; // Ignore the current token
407 407
                         $nextToken = $list->getNext();
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
                     } elseif (
425 425
                         (array_key_exists($arrayKey, self::DATABASE_OPTIONS)
426 426
                         || array_key_exists($arrayKey, self::TABLE_OPTIONS))
427
-                        && ! self::checkIfColumnDefinitionKeyword($arrayKey)
427
+                        && !self::checkIfColumnDefinitionKeyword($arrayKey)
428 428
                     ) {
429 429
                         // This alter operation has finished, which means a comma
430 430
                         // was missing before start of new alter operation
Please login to merge, or discard this patch.
src/Parsers/CaseExpressions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 
200 200
                 // Handle optional AS keyword before alias
201 201
                 if ($token->type === TokenType::Keyword && $token->keyword === 'AS') {
202
-                    if ($asFound || ! empty($ret->alias)) {
202
+                    if ($asFound || !empty($ret->alias)) {
203 203
                         $parser->error('Potential duplicate alias of CASE expression.', $token);
204 204
                         break;
205 205
                     }
@@ -221,11 +221,11 @@  discard block
 block discarded – undo
221 221
                 if (
222 222
                     $asFound
223 223
                     || $token->type === TokenType::String
224
-                    || ($token->type === TokenType::Symbol && ! $token->flags & Token::FLAG_SYMBOL_VARIABLE)
224
+                    || ($token->type === TokenType::Symbol && !$token->flags & Token::FLAG_SYMBOL_VARIABLE)
225 225
                     || $token->type === TokenType::None
226 226
                 ) {
227 227
                     // An alias is expected (the keyword `AS` was previously found).
228
-                    if (! empty($ret->alias)) {
228
+                    if (!empty($ret->alias)) {
229 229
                         $parser->error('An alias was previously found.', $token);
230 230
                         break;
231 231
                     }
Please login to merge, or discard this patch.
src/Parsers/DataTypes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      * @param TokensList           $list    the list of tokens that are being parsed
45 45
      * @param array<string, mixed> $options parameters for parsing
46 46
      */
47
-    public static function parse(Parser $parser, TokensList $list, array $options = []): DataType|null
47
+    public static function parse(Parser $parser, TokensList $list, array $options = []): DataType | null
48 48
     {
49 49
         $ret = new DataType();
50 50
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
             if ($state === 0) {
74 74
                 $ret->name = strtoupper((string) $token->value);
75
-                if (($token->type !== TokenType::Keyword) || (! ($token->flags & Token::FLAG_KEYWORD_DATA_TYPE))) {
75
+                if (($token->type !== TokenType::Keyword) || (!($token->flags & Token::FLAG_KEYWORD_DATA_TYPE))) {
76 76
                     $parser->error('Unrecognized data type.', $token);
77 77
                 }
78 78
 
Please login to merge, or discard this patch.