Passed
Pull Request — master (#535)
by
unknown
02:55
created
src/Tools/ContextGenerator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
             // Reserved, data types, keys, functions, etc. keywords.
172 172
             foreach (static::$labelsFlags as $label => $flags) {
173
-                if (! str_contains($value, $label)) {
173
+                if (!str_contains($value, $label)) {
174 174
                     continue;
175 175
                 }
176 176
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
             }
191 191
 
192 192
             $value = strtoupper($value);
193
-            if (! isset($types[$value])) {
193
+            if (!isset($types[$value])) {
194 194
                 $types[$value] = $type;
195 195
             } else {
196 196
                 $types[$value] |= $type;
@@ -200,11 +200,11 @@  discard block
 block discarded – undo
200 200
         $ret = [];
201 201
         foreach ($types as $word => $type) {
202 202
             $len = strlen($word);
203
-            if (! isset($ret[$type])) {
203
+            if (!isset($ret[$type])) {
204 204
                 $ret[$type] = [];
205 205
             }
206 206
 
207
-            if (! isset($ret[$type][$len])) {
207
+            if (!isset($ret[$type][$len])) {
208 208
                 $ret[$type][$len] = [];
209 209
             }
210 210
 
Please login to merge, or discard this patch.
src/Tools/TestGenerator.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         // The code below extracts only the relevant information.
84 84
 
85 85
         // Extracting lexer's errors.
86
-        if (! empty($lexer->errors)) {
86
+        if (!empty($lexer->errors)) {
87 87
             /** @var LexerException $err */
88 88
             foreach ($lexer->errors as $err) {
89 89
                 $lexerErrors[] = [
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         }
99 99
 
100 100
         // Extracting parser's errors.
101
-        if (! empty($parser->errors)) {
101
+        if (!empty($parser->errors)) {
102 102
             /** @var ParserException $err */
103 103
             foreach ($parser->errors as $err) {
104 104
                 $parserErrors[] = [
@@ -137,11 +137,11 @@  discard block
 block discarded – undo
137 137
         string $type,
138 138
         string $input,
139 139
         string $output,
140
-        string|null $debug = null,
140
+        string | null $debug = null,
141 141
         bool $ansi = false,
142 142
     ): void {
143 143
         // Support query types: `lexer` / `parser`.
144
-        if (! in_array($type, ['lexer', 'parser'])) {
144
+        if (!in_array($type, ['lexer', 'parser'])) {
145 145
             throw new Exception('Unknown test type (expected `lexer` or `parser`).');
146 146
         }
147 147
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         );
187 187
 
188 188
         // Remove the project path from .out file, it changes for each dev
189
-        $projectFolder = dirname(__DIR__, 2);// Jump to root
189
+        $projectFolder = dirname(__DIR__, 2); // Jump to root
190 190
         $encoded = str_replace($projectFolder, '<project-root>', $encoded);
191 191
 
192 192
         file_put_contents($output, $encoded);
@@ -223,11 +223,11 @@  discard block
 block discarded – undo
223 223
             if (is_dir($inputFile)) {
224 224
                 // Creating required directories to maintain the structure.
225 225
                 // Ignoring errors if the folder structure exists already.
226
-                if (! is_dir($outputFile)) {
226
+                if (!is_dir($outputFile)) {
227 227
                     mkdir($outputFile);
228 228
                 }
229 229
 
230
-                if (($debug !== null) && (! is_dir($debugFile))) {
230
+                if (($debug !== null) && (!is_dir($debugFile))) {
231 231
                     mkdir($debugFile);
232 232
                 }
233 233
 
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
                 }
243 243
 
244 244
                 // Building the test.
245
-                if (! file_exists($outputFile)) {
245
+                if (!file_exists($outputFile)) {
246 246
                     echo sprintf("Building test for %s...\n", $inputFile);
247 247
                     static::build(
248 248
                         str_contains($inputFile, 'lex') ? 'lexer' : 'parser',
Please login to merge, or discard this patch.
src/Utils/Query.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -299,23 +299,23 @@  discard block
 block discarded – undo
299 299
             $flags['distinct'] = true;
300 300
         }
301 301
 
302
-        if (! empty($statement->group) || ! empty($statement->having)) {
302
+        if (!empty($statement->group) || !empty($statement->having)) {
303 303
             $flags['is_group'] = true;
304 304
         }
305 305
 
306
-        if (! empty($statement->into) && ($statement->into->type === 'OUTFILE')) {
306
+        if (!empty($statement->into) && ($statement->into->type === 'OUTFILE')) {
307 307
             $flags['is_export'] = true;
308 308
         }
309 309
 
310 310
         $expressions = $statement->expr;
311
-        if (! empty($statement->join)) {
311
+        if (!empty($statement->join)) {
312 312
             foreach ($statement->join as $join) {
313 313
                 $expressions[] = $join->expr;
314 314
             }
315 315
         }
316 316
 
317 317
         foreach ($expressions as $expr) {
318
-            if (! empty($expr->function)) {
318
+            if (!empty($expr->function)) {
319 319
                 if ($expr->function === 'COUNT') {
320 320
                     $flags['is_count'] = true;
321 321
                 } elseif (in_array($expr->function, static::$functions)) {
@@ -330,15 +330,15 @@  discard block
 block discarded – undo
330 330
             $flags['is_subquery'] = true;
331 331
         }
332 332
 
333
-        if (! empty($statement->procedure) && ($statement->procedure->name === 'ANALYSE')) {
333
+        if (!empty($statement->procedure) && ($statement->procedure->name === 'ANALYSE')) {
334 334
             $flags['is_analyse'] = true;
335 335
         }
336 336
 
337
-        if (! empty($statement->group)) {
337
+        if (!empty($statement->group)) {
338 338
             $flags['group'] = true;
339 339
         }
340 340
 
341
-        if (! empty($statement->having)) {
341
+        if (!empty($statement->having)) {
342 342
             $flags['having'] = true;
343 343
         }
344 344
 
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
             $flags['union'] = true;
347 347
         }
348 348
 
349
-        if (! empty($statement->join)) {
349
+        if (!empty($statement->join)) {
350 350
             $flags['join'] = true;
351 351
         }
352 352
 
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
      * @return array<string, bool|string>
363 363
      * @psalm-return QueryFlagsType
364 364
      */
365
-    public static function getFlags(Statement|null $statement, bool $all = false): array
365
+    public static function getFlags(Statement | null $statement, bool $all = false): array
366 366
     {
367 367
         $flags = ['querytype' => false];
368 368
         if ($all) {
@@ -437,11 +437,11 @@  discard block
 block discarded – undo
437 437
             || ($statement instanceof UpdateStatement)
438 438
             || ($statement instanceof DeleteStatement)
439 439
         ) {
440
-            if (! empty($statement->limit)) {
440
+            if (!empty($statement->limit)) {
441 441
                 $flags['limit'] = true;
442 442
             }
443 443
 
444
-            if (! empty($statement->order)) {
444
+            if (!empty($statement->order)) {
445 445
                 $flags['order'] = true;
446 446
             }
447 447
         }
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
             // Finding tables' aliases and their associated real names.
492 492
             $tableAliases = [];
493 493
             foreach ($statement->from as $expr) {
494
-                if (! isset($expr->table, $expr->alias) || ($expr->table === '') || ($expr->alias === '')) {
494
+                if (!isset($expr->table, $expr->alias) || ($expr->table === '') || ($expr->alias === '')) {
495 495
                     continue;
496 496
                 }
497 497
 
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
                         ];
517 517
                     }
518 518
 
519
-                    if (! in_array($arr, $ret['select_tables'])) {
519
+                    if (!in_array($arr, $ret['select_tables'])) {
520 520
                         $ret['select_tables'][] = $arr;
521 521
                     }
522 522
                 } else {
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
             // extracted from the FROM clause.
530 530
             if ($ret['select_tables'] === []) {
531 531
                 foreach ($statement->from as $expr) {
532
-                    if (! isset($expr->table) || ($expr->table === '')) {
532
+                    if (!isset($expr->table) || ($expr->table === '')) {
533 533
                         continue;
534 534
                     }
535 535
 
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
         } elseif (($statement instanceof AlterStatement) || ($statement instanceof TruncateStatement)) {
571 571
             $expressions = [$statement->table];
572 572
         } elseif ($statement instanceof DropStatement) {
573
-            if (! $statement->options->has('TABLE')) {
573
+            if (!$statement->options->has('TABLE')) {
574 574
                 // No tables are dropped.
575 575
                 return [];
576 576
             }
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
         Statement $statement,
616 616
         TokensList $list,
617 617
         string $clause,
618
-        int|string $type = 0,
618
+        int | string $type = 0,
619 619
         bool $skipFirst = true,
620 620
     ): string {
621 621
         /**
@@ -747,7 +747,7 @@  discard block
 block discarded – undo
747 747
         Statement $statement,
748 748
         TokensList $list,
749 749
         string $old,
750
-        string|null $new = null,
750
+        string | null $new = null,
751 751
         bool $onlyType = false,
752 752
     ): string {
753 753
         // TODO: Update the tokens list and the statement.
@@ -826,7 +826,7 @@  discard block
 block discarded – undo
826 826
      *                                 the remaining part of the query and the last delimiter
827 827
      * @psalm-return array{string|null, string, string|null}
828 828
      */
829
-    public static function getFirstStatement(string $query, string|null $delimiter = null): array
829
+    public static function getFirstStatement(string $query, string | null $delimiter = null): array
830 830
     {
831 831
         $lexer = new Lexer($query, false, $delimiter);
832 832
         $list = $lexer->list;
@@ -854,7 +854,7 @@  discard block
 block discarded – undo
854 854
 
855 855
             $statement .= $token->token;
856 856
 
857
-            if (($token->type === TokenType::Delimiter) && ! empty($token->token)) {
857
+            if (($token->type === TokenType::Delimiter) && !empty($token->token)) {
858 858
                 $delimiter = $token->token;
859 859
                 $fullStatement = true;
860 860
                 break;
@@ -863,7 +863,7 @@  discard block
 block discarded – undo
863 863
 
864 864
         // No statement was found so we return the entire query as being the
865 865
         // remaining part.
866
-        if (! $fullStatement) {
866
+        if (!$fullStatement) {
867 867
             return [
868 868
                 null,
869 869
                 $query,
Please login to merge, or discard this patch.
src/Utils/CLI.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     {
37 37
         foreach ($longopts as $value) {
38 38
             $value = rtrim($value, ':');
39
-            if (! isset($params[$value])) {
39
+            if (!isset($params[$value])) {
40 40
                 continue;
41 41
             }
42 42
 
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
      *
56 56
      * @return string[]|false[]|false
57 57
      */
58
-    public function getopt(string $opt, array $long): array|false
58
+    public function getopt(string $opt, array $long): array | false
59 59
     {
60 60
         return getopt($opt, $long);
61 61
     }
62 62
 
63 63
     /** @return string[]|false[]|false */
64
-    public function parseHighlight(): array|false
64
+    public function parseHighlight(): array | false
65 65
     {
66 66
         $longopts = [
67 67
             'help',
@@ -75,11 +75,11 @@  discard block
 block discarded – undo
75 75
         }
76 76
 
77 77
         $this->mergeLongOpts($params, $longopts);
78
-        if (! isset($params['f'])) {
78
+        if (!isset($params['f'])) {
79 79
             $params['f'] = 'cli';
80 80
         }
81 81
 
82
-        if (! in_array($params['f'], ['html', 'cli', 'text'])) {
82
+        if (!in_array($params['f'], ['html', 'cli', 'text'])) {
83 83
             echo "ERROR: Invalid value for format!\n";
84 84
 
85 85
             return false;
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             return 0;
102 102
         }
103 103
 
104
-        if (! isset($params['q'])) {
104
+        if (!isset($params['q'])) {
105 105
             $stdIn = $this->readStdin();
106 106
 
107 107
             if ($stdIn) {
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     }
137 137
 
138 138
     /** @return string[]|false[]|false */
139
-    public function parseLint(): array|false
139
+    public function parseLint(): array | false
140 140
     {
141 141
         $longopts = [
142 142
             'help',
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
             Context::load($params['c']);
172 172
         }
173 173
 
174
-        if (! isset($params['q'])) {
174
+        if (!isset($params['q'])) {
175 175
             $stdIn = $this->readStdin();
176 176
 
177 177
             if ($stdIn) {
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
     }
212 212
 
213 213
     /** @return string[]|false[]|false */
214
-    public function parseTokenize(): array|false
214
+    public function parseTokenize(): array | false
215 215
     {
216 216
         $longopts = [
217 217
             'help',
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
             return 0;
242 242
         }
243 243
 
244
-        if (! isset($params['q'])) {
244
+        if (!isset($params['q'])) {
245 245
             $stdIn = $this->readStdin();
246 246
 
247 247
             if ($stdIn) {
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
         return 1;
278 278
     }
279 279
 
280
-    public function readStdin(): string|false|null
280
+    public function readStdin(): string | false | null
281 281
     {
282 282
         $read = [STDIN];
283 283
         $write = [];
Please login to merge, or discard this patch.
src/Token.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         switch ($this->type) {
129 129
             case TokenType::Keyword:
130 130
                 $this->keyword = strtoupper($this->token);
131
-                if (! ($this->flags & self::FLAG_KEYWORD_RESERVED)) {
131
+                if (!($this->flags & self::FLAG_KEYWORD_RESERVED)) {
132 132
                     // Unreserved keywords should stay the way they are because they
133 133
                     // might represent field names.
134 134
                     return $this->token;
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
                     }
154 154
                 } elseif (($this->flags & self::FLAG_NUMBER_APPROXIMATE) || ($this->flags & self::FLAG_NUMBER_FLOAT)) {
155 155
                     $ret = (float) $ret;
156
-                } elseif (! ($this->flags & self::FLAG_NUMBER_BINARY)) {
156
+                } elseif (!($this->flags & self::FLAG_NUMBER_BINARY)) {
157 157
                     $ret = (int) $ret;
158 158
                 }
159 159
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                     // in PHP 5.3- the `null` parameter isn't handled correctly.
189 189
                     $str = mb_substr(
190 190
                         $str,
191
-                        ! empty($str[1]) && ($str[1] === '@') ? 2 : 1,
191
+                        !empty($str[1]) && ($str[1] === '@') ? 2 : 1,
192 192
                         mb_strlen($str),
193 193
                         'UTF-8',
194 194
                     );
Please login to merge, or discard this patch.
src/Components/DataType.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
      * @param OptionsArray   $options    the options of this data type
79 79
      */
80 80
     public function __construct(
81
-        string|null $name = null,
81
+        string | null $name = null,
82 82
         array $parameters = [],
83
-        OptionsArray|null $options = null,
83
+        OptionsArray | null $options = null,
84 84
     ) {
85 85
         $this->name = $name;
86 86
         $this->parameters = $parameters;
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      * @param TokensList           $list    the list of tokens that are being parsed
93 93
      * @param array<string, mixed> $options parameters for parsing
94 94
      */
95
-    public static function parse(Parser $parser, TokensList $list, array $options = []): DataType|null
95
+    public static function parse(Parser $parser, TokensList $list, array $options = []): DataType | null
96 96
     {
97 97
         $ret = new static();
98 98
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 
123 123
             if ($state === 0) {
124 124
                 $ret->name = strtoupper((string) $token->value);
125
-                if (($token->type !== TokenType::Keyword) || (! ($token->flags & Token::FLAG_KEYWORD_DATA_TYPE))) {
125
+                if (($token->type !== TokenType::Keyword) || (!($token->flags & Token::FLAG_KEYWORD_DATA_TYPE))) {
126 126
                     $parser->error('Unrecognized data type.', $token);
127 127
                 }
128 128
 
Please login to merge, or discard this patch.
src/Components/IntoKeyword.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -113,12 +113,12 @@  discard block
 block discarded – undo
113 113
      * @param bool|null              $fieldsKeyword options for OPTIONS keyword
114 114
      */
115 115
     public function __construct(
116
-        string|null $type = null,
117
-        string|Expression|null $dest = null,
118
-        array|null $columns = null,
119
-        array|null $values = null,
120
-        OptionsArray|null $fieldsOptions = null,
121
-        bool|null $fieldsKeyword = null,
116
+        string | null $type = null,
117
+        string | Expression | null $dest = null,
118
+        array | null $columns = null,
119
+        array | null $values = null,
120
+        OptionsArray | null $fieldsOptions = null,
121
+        bool | null $fieldsKeyword = null,
122 122
     ) {
123 123
         $this->type = $type;
124 124
         $this->dest = $dest;
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
     public function build(): string
255 255
     {
256 256
         if ($this->dest instanceof Expression) {
257
-            $columns = ! empty($this->columns) ? '(`' . implode('`, `', $this->columns) . '`)' : '';
257
+            $columns = !empty($this->columns) ? '(`' . implode('`, `', $this->columns) . '`)' : '';
258 258
 
259 259
             return $this->dest . $columns;
260 260
         }
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
@@ -19,17 +19,17 @@  discard block
 block discarded – undo
19 19
     /**
20 20
      * The type of hint (USE/FORCE/IGNORE)
21 21
      */
22
-    public string|null $type;
22
+    public string | null $type;
23 23
 
24 24
     /**
25 25
      * What the hint is for (INDEX/KEY)
26 26
      */
27
-    public string|null $indexOrKey;
27
+    public string | null $indexOrKey;
28 28
 
29 29
     /**
30 30
      * The clause for which this hint is (JOIN/ORDER BY/GROUP BY)
31 31
      */
32
-    public string|null $for;
32
+    public string | null $for;
33 33
 
34 34
     /**
35 35
      * List of indexes in this hint
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
      * @param Expression[] $indexes    List of indexes in this hint
46 46
      */
47 47
     public function __construct(
48
-        string|null $type = null,
49
-        string|null $indexOrKey = null,
50
-        string|null $for = null,
48
+        string | null $type = null,
49
+        string | null $indexOrKey = null,
50
+        string | null $for = null,
51 51
         array $indexes = [],
52 52
     ) {
53 53
         $this->type = $type;
Please login to merge, or discard this patch.
src/Components/Expression.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -112,10 +112,10 @@  discard block
 block discarded – undo
112 112
      * @param string|null $alias    the name of the alias
113 113
      */
114 114
     public function __construct(
115
-        string|null $database = null,
116
-        string|null $table = null,
117
-        string|null $column = null,
118
-        string|null $alias = null,
115
+        string | null $database = null,
116
+        string | null $table = null,
117
+        string | null $column = null,
118
+        string | null $alias = null,
119 119
     ) {
120 120
         if (($column === null) && ($alias === null)) {
121 121
             $this->expr = $database; // case 1
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
      *
161 161
      * @throws ParserException
162 162
      */
163
-    public static function parse(Parser $parser, TokensList $list, array $options = []): Expression|null
163
+    public static function parse(Parser $parser, TokensList $list, array $options = []): Expression | null
164 164
     {
165 165
         $ret = new static();
166 166
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
         ];
204 204
 
205 205
         // When a field is parsed, no parentheses are expected.
206
-        if (! empty($options['parseField'])) {
206
+        if (!empty($options['parseField'])) {
207 207
             $options['breakOnParentheses'] = true;
208 208
             $options['field'] = $options['parseField'];
209 209
         }
@@ -230,14 +230,14 @@  discard block
 block discarded – undo
230 230
             }
231 231
 
232 232
             if ($token->type === TokenType::Keyword) {
233
-                if (($brackets > 0) && empty($ret->subquery) && ! empty(Parser::STATEMENT_PARSERS[$token->keyword])) {
233
+                if (($brackets > 0) && empty($ret->subquery) && !empty(Parser::STATEMENT_PARSERS[$token->keyword])) {
234 234
                     // A `(` was previously found and this keyword is the
235 235
                     // beginning of a statement, so this is a subquery.
236 236
                     $ret->subquery = $token->keyword;
237 237
                 } elseif (
238 238
                     ($token->flags & Token::FLAG_KEYWORD_FUNCTION)
239 239
                     && (empty($options['parseField'])
240
-                    && ! $alias)
240
+                    && !$alias)
241 241
                 ) {
242 242
                     $isExpr = true;
243 243
                 } elseif (($token->flags & Token::FLAG_KEYWORD_RESERVED) && ($brackets === 0)) {
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
                     }
250 250
 
251 251
                     if ($token->keyword === 'AS') {
252
-                        if (! empty($options['breakOnAlias'])) {
252
+                        if (!empty($options['breakOnAlias'])) {
253 253
                             break;
254 254
                         }
255 255
 
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
                     }
273 273
 
274 274
                     $isExpr = true;
275
-                } elseif ($brackets === 0 && strlen((string) $ret->expr) > 0 && ! $alias) {
275
+                } elseif ($brackets === 0 && strlen((string) $ret->expr) > 0 && !$alias) {
276 276
                     /* End of expression */
277 277
                     break;
278 278
                 }
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
                 || (($token->type === TokenType::Operator)
289 289
                 && ($token->value !== '.'))
290 290
             ) {
291
-                if (! empty($options['parseField'])) {
291
+                if (!empty($options['parseField'])) {
292 292
                     break;
293 293
                 }
294 294
 
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
             }
299 299
 
300 300
             if ($token->type === TokenType::Operator) {
301
-                if (! empty($options['breakOnParentheses']) && (($token->value === '(') || ($token->value === ')'))) {
301
+                if (!empty($options['breakOnParentheses']) && (($token->value === '(') || ($token->value === ')'))) {
302 302
                     // No brackets were expected.
303 303
                     break;
304 304
                 }
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 
323 323
                     --$brackets;
324 324
                     if ($brackets === 0) {
325
-                        if (! empty($options['parenthesesDelimited'])) {
325
+                        if (!empty($options['parenthesesDelimited'])) {
326 326
                             // The current token is the last bracket, the next
327 327
                             // one will be outside the expression.
328 328
                             $ret->expr .= $token->token;
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 
349 349
             if ($alias) {
350 350
                 // An alias is expected (the keyword `AS` was previously found).
351
-                if (! empty($ret->alias)) {
351
+                if (!empty($ret->alias)) {
352 352
                     $parser->error('An alias was previously found.', $token);
353 353
                     break;
354 354
                 }
@@ -362,15 +362,15 @@  discard block
 block discarded – undo
362 362
                     && ($prev[0] === null
363 363
                         || (($prev[0]->type !== TokenType::Operator || $prev[0]->token === ')')
364 364
                             && ($prev[0]->type !== TokenType::Keyword
365
-                                || ! ($prev[0]->flags & Token::FLAG_KEYWORD_RESERVED))))
365
+                                || !($prev[0]->flags & Token::FLAG_KEYWORD_RESERVED))))
366 366
                     && (($prev[1]->type === TokenType::String)
367 367
                         || ($prev[1]->type === TokenType::Symbol
368
-                            && ! ($prev[1]->flags & Token::FLAG_SYMBOL_VARIABLE)
369
-                            && ! ($prev[1]->flags & Token::FLAG_SYMBOL_PARAMETER))
368
+                            && !($prev[1]->flags & Token::FLAG_SYMBOL_VARIABLE)
369
+                            && !($prev[1]->flags & Token::FLAG_SYMBOL_PARAMETER))
370 370
                         || ($prev[1]->type === TokenType::None
371 371
                             && $prev[1]->token !== 'OVER'))
372 372
                 ) {
373
-                    if (! empty($ret->alias)) {
373
+                    if (!empty($ret->alias)) {
374 374
                         $parser->error('An alias was previously found.', $token);
375 375
                         break;
376 376
                     }
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
                     // Found a `.` which means we expect a column name and
402 402
                     // the column name we parsed is actually the table name
403 403
                     // and the table name is actually a database name.
404
-                    if (! empty($ret->database) || $dot) {
404
+                    if (!empty($ret->database) || $dot) {
405 405
                         $parser->error('Unexpected dot.', $token);
406 406
                     }
407 407
 
@@ -418,11 +418,11 @@  discard block
 block discarded – undo
418 418
                         $dot = false;
419 419
                     } else {
420 420
                         // No alias is expected.
421
-                        if (! empty($options['breakOnAlias'])) {
421
+                        if (!empty($options['breakOnAlias'])) {
422 422
                             break;
423 423
                         }
424 424
 
425
-                        if (! empty($ret->alias)) {
425
+                        if (!empty($ret->alias)) {
426 426
                             $parser->error('An alias was previously found.', $token);
427 427
                             break;
428 428
                         }
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
             $ret = implode('.', Context::escapeAll($fields));
471 471
         }
472 472
 
473
-        if (! empty($this->alias)) {
473
+        if (!empty($this->alias)) {
474 474
             $ret .= ' AS ' . Context::escape($this->alias);
475 475
         }
476 476
 
Please login to merge, or discard this patch.