Passed
Pull Request — master (#535)
by
unknown
02:55
created
src/Components/Parsers/OrderKeywords.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
                 ) {
89 89
                     $expr->type = $token->keyword;
90 90
                 } elseif (($token->type === TokenType::Operator) && ($token->value === ',')) {
91
-                    if (! empty($expr->expr)) {
91
+                    if (!empty($expr->expr)) {
92 92
                         $ret[] = $expr;
93 93
                     }
94 94
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         }
102 102
 
103 103
         // Last iteration was not processed.
104
-        if (! empty($expr->expr)) {
104
+        if (!empty($expr->expr)) {
105 105
             $ret[] = $expr;
106 106
         }
107 107
 
Please login to merge, or discard this patch.
src/Components/Parsers/Conditions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
                 } else {
152 152
                     // The expression ended.
153 153
                     $expr->expr = trim($expr->expr);
154
-                    if (! empty($expr->expr)) {
154
+                    if (!empty($expr->expr)) {
155 155
                         $ret[] = $expr;
156 156
                     }
157 157
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
             if (
170 170
                 ($token->type === TokenType::Keyword)
171 171
                 && ($token->flags & Token::FLAG_KEYWORD_RESERVED)
172
-                && ! ($token->flags & Token::FLAG_KEYWORD_FUNCTION)
172
+                && !($token->flags & Token::FLAG_KEYWORD_FUNCTION)
173 173
             ) {
174 174
                 if ($token->value === 'BETWEEN') {
175 175
                     $betweenBefore = true;
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 
213 213
         // Last iteration was not processed.
214 214
         $expr->expr = trim($expr->expr);
215
-        if (! empty($expr->expr)) {
215
+        if (!empty($expr->expr)) {
216 216
             $ret[] = $expr;
217 217
         }
218 218
 
Please login to merge, or discard this patch.
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/Statement.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -62,23 +62,23 @@  discard block
 block discarded – undo
62 62
      *
63 63
      * @see Statement::$statementOptions
64 64
      */
65
-    public OptionsArray|null $options = null;
65
+    public OptionsArray | null $options = null;
66 66
 
67 67
     /**
68 68
      * The index of the first token used in this statement.
69 69
      */
70
-    public int|null $first = null;
70
+    public int | null $first = null;
71 71
 
72 72
     /**
73 73
      * The index of the last token used in this statement.
74 74
      */
75
-    public int|null $last = null;
75
+    public int | null $last = null;
76 76
 
77 77
     /**
78 78
      * @param Parser|null     $parser the instance that requests parsing
79 79
      * @param TokensList|null $list   the list of tokens to be parsed
80 80
      */
81
-    public function __construct(Parser|null $parser = null, TokensList|null $list = null)
81
+    public function __construct(Parser | null $parser = null, TokensList | null $list = null)
82 82
     {
83 83
         if (($parser === null) || ($list === null)) {
84 84
             return;
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
             // Checking if this field was already built.
129 129
             if ($type & self::ADD_CLAUSE) {
130
-                if (! empty($built[$field])) {
130
+                if (!empty($built[$field])) {
131 131
                     continue;
132 132
                 }
133 133
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
             }
141 141
 
142 142
             // Checking if the result of the builder should be added.
143
-            if (! ($type & self::ADD_CLAUSE)) {
143
+            if (!($type & self::ADD_CLAUSE)) {
144 144
                 continue;
145 145
             }
146 146
 
@@ -265,8 +265,8 @@  discard block
 block discarded – undo
265 265
             $options = [];
266 266
 
267 267
             // Looking for duplicated clauses.
268
-            if (! empty(Parser::KEYWORD_PARSERS[$token->value]) || ! empty(Parser::STATEMENT_PARSERS[$token->value])) {
269
-                if (! empty($parsedClauses[$token->value])) {
268
+            if (!empty(Parser::KEYWORD_PARSERS[$token->value]) || !empty(Parser::STATEMENT_PARSERS[$token->value])) {
269
+                if (!empty($parsedClauses[$token->value])) {
270 270
                     $parser->error('This type of clause was previously parsed.', $token);
271 271
                     break;
272 272
                 }
@@ -279,18 +279,18 @@  discard block
 block discarded – undo
279 279
             // but it might be the beginning of a statement of truncate,
280 280
             // so let the value use the keyword field for truncate type.
281 281
             $tokenValue = in_array($token->keyword, ['TRUNCATE']) ? $token->keyword : $token->value;
282
-            if (! empty(Parser::KEYWORD_PARSERS[$tokenValue]) && $list->idx < $list->count) {
282
+            if (!empty(Parser::KEYWORD_PARSERS[$tokenValue]) && $list->idx < $list->count) {
283 283
                 $class = Parser::KEYWORD_PARSERS[$tokenValue]['class'];
284 284
                 $field = Parser::KEYWORD_PARSERS[$tokenValue]['field'];
285
-                if (! empty(Parser::KEYWORD_PARSERS[$tokenValue]['options'])) {
285
+                if (!empty(Parser::KEYWORD_PARSERS[$tokenValue]['options'])) {
286 286
                     $options = Parser::KEYWORD_PARSERS[$tokenValue]['options'];
287 287
                 }
288 288
             }
289 289
 
290 290
             // Checking if this is the beginning of the statement.
291
-            if (! empty(Parser::STATEMENT_PARSERS[$token->keyword])) {
291
+            if (!empty(Parser::STATEMENT_PARSERS[$token->keyword])) {
292 292
                 if (
293
-                    ! empty(static::$clauses) // Undefined for some statements.
293
+                    !empty(static::$clauses) // Undefined for some statements.
294 294
                     && empty(static::$clauses[$token->value])
295 295
                 ) {
296 296
                     // Some keywords (e.g. `SET`) may be the beginning of a
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
                     break;
306 306
                 }
307 307
 
308
-                if (! $parsedOptions) {
308
+                if (!$parsedOptions) {
309 309
                     if (empty(static::$statementOptions[$token->value])) {
310 310
                         // Skipping keyword because if it is not a option.
311 311
                         ++$list->idx;
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
                 if ($minJoin === 0 && stripos($clauseType, 'JOIN')) {
478 478
                     // First JOIN clause is detected
479 479
                     $minJoin = $maxJoin = $clauseStartIdx;
480
-                } elseif ($minJoin !== 0 && ! stripos($clauseType, 'JOIN')) {
480
+                } elseif ($minJoin !== 0 && !stripos($clauseType, 'JOIN')) {
481 481
                     // After a previous JOIN clause, a non-JOIN clause has been detected
482 482
                     $maxJoin = $lastIdx;
483 483
                 } elseif ($maxJoin < $clauseStartIdx && stripos($clauseType, 'JOIN')) {
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.