Completed
Push — master ( 6d8a7d...578d3a )
by Maurício
18s queued 15s
created
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.