Completed
Push — master ( 8b6d77...d70677 )
by Maurício
32s queued 15s
created
src/Components/OrderKeyword.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      * @param Expression $expr the expression that we are sorting by
30 30
      * @param string     $type the sorting type
31 31
      */
32
-    public function __construct(Expression|null $expr = null, string $type = 'ASC')
32
+    public function __construct(Expression | null $expr = null, string $type = 'ASC')
33 33
     {
34 34
         $this->expr = $expr;
35 35
         $this->type = $type;
Please login to merge, or discard this patch.
src/Components/Condition.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     public $expr;
33 33
 
34 34
     /** @param string $expr the condition or the operator */
35
-    public function __construct(string|null $expr = null)
35
+    public function __construct(string | null $expr = null)
36 36
     {
37 37
         $this->expr = trim((string) $expr);
38 38
     }
Please login to merge, or discard this patch.
src/Components/RenameOperation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      * @param Expression $old old expression
30 30
      * @param Expression $new new expression containing new name
31 31
      */
32
-    public function __construct(Expression|null $old = null, Expression|null $new = null)
32
+    public function __construct(Expression | null $old = null, Expression | null $new = null)
33 33
     {
34 34
         $this->old = $old;
35 35
         $this->new = $new;
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/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/Statement.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -63,23 +63,23 @@  discard block
 block discarded – undo
63 63
      *
64 64
      * @see Statement::$statementOptions
65 65
      */
66
-    public OptionsArray|null $options = null;
66
+    public OptionsArray | null $options = null;
67 67
 
68 68
     /**
69 69
      * The index of the first token used in this statement.
70 70
      */
71
-    public int|null $first = null;
71
+    public int | null $first = null;
72 72
 
73 73
     /**
74 74
      * The index of the last token used in this statement.
75 75
      */
76
-    public int|null $last = null;
76
+    public int | null $last = null;
77 77
 
78 78
     /**
79 79
      * @param Parser|null     $parser the instance that requests parsing
80 80
      * @param TokensList|null $list   the list of tokens to be parsed
81 81
      */
82
-    public function __construct(Parser|null $parser = null, TokensList|null $list = null)
82
+    public function __construct(Parser | null $parser = null, TokensList | null $list = null)
83 83
     {
84 84
         if (($parser === null) || ($list === null)) {
85 85
             return;
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
             // Checking if this field was already built.
126 126
             if ($type & self::ADD_CLAUSE) {
127
-                if (! empty($built[$field])) {
127
+                if (!empty($built[$field])) {
128 128
                     continue;
129 129
                 }
130 130
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
             }
138 138
 
139 139
             // Checking if the result of the builder should be added.
140
-            if (! ($type & self::ADD_CLAUSE)) {
140
+            if (!($type & self::ADD_CLAUSE)) {
141 141
                 continue;
142 142
             }
143 143
 
@@ -260,8 +260,8 @@  discard block
 block discarded – undo
260 260
             $options = [];
261 261
 
262 262
             // Looking for duplicated clauses.
263
-            if (isset(Parser::KEYWORD_PARSERS[$token->value]) || ! empty(Parser::STATEMENT_PARSERS[$token->value])) {
264
-                if (! empty($parsedClauses[$token->value])) {
263
+            if (isset(Parser::KEYWORD_PARSERS[$token->value]) || !empty(Parser::STATEMENT_PARSERS[$token->value])) {
264
+                if (!empty($parsedClauses[$token->value])) {
265 265
                     $parser->error('This type of clause was previously parsed.', $token);
266 266
                     break;
267 267
                 }
@@ -277,15 +277,15 @@  discard block
 block discarded – undo
277 277
             if (isset(Parser::KEYWORD_PARSERS[$tokenValue]) && $list->idx < $list->count) {
278 278
                 $class = Parser::KEYWORD_PARSERS[$tokenValue]['class'];
279 279
                 $field = Parser::KEYWORD_PARSERS[$tokenValue]['field'];
280
-                if (! empty(Parser::KEYWORD_PARSERS[$tokenValue]['options'])) {
280
+                if (!empty(Parser::KEYWORD_PARSERS[$tokenValue]['options'])) {
281 281
                     $options = Parser::KEYWORD_PARSERS[$tokenValue]['options'];
282 282
                 }
283 283
             }
284 284
 
285 285
             // Checking if this is the beginning of the statement.
286
-            if (! empty(Parser::STATEMENT_PARSERS[$token->keyword])) {
286
+            if (!empty(Parser::STATEMENT_PARSERS[$token->keyword])) {
287 287
                 if (
288
-                    ! empty(static::$clauses) // Undefined for some statements.
288
+                    !empty(static::$clauses) // Undefined for some statements.
289 289
                     && empty(static::$clauses[$token->value])
290 290
                 ) {
291 291
                     // Some keywords (e.g. `SET`) may be the beginning of a
@@ -300,8 +300,8 @@  discard block
 block discarded – undo
300 300
                     break;
301 301
                 }
302 302
 
303
-                if (! $parsedOptions) {
304
-                    if (! array_key_exists((string) $token->value, static::$statementOptions)) {
303
+                if (!$parsedOptions) {
304
+                    if (!array_key_exists((string) $token->value, static::$statementOptions)) {
305 305
                         // Skipping keyword because if it is not a option.
306 306
                         ++$list->idx;
307 307
                     }
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
                 if ($minJoin === 0 && stripos($clauseType, 'JOIN')) {
469 469
                     // First JOIN clause is detected
470 470
                     $minJoin = $maxJoin = $clauseStartIdx;
471
-                } elseif ($minJoin !== 0 && ! stripos($clauseType, 'JOIN')) {
471
+                } elseif ($minJoin !== 0 && !stripos($clauseType, 'JOIN')) {
472 472
                     // After a previous JOIN clause, a non-JOIN clause has been detected
473 473
                     $maxJoin = $lastIdx;
474 474
                 } elseif ($maxJoin < $clauseStartIdx && stripos($clauseType, 'JOIN')) {
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.