@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | |
117 | 117 | if ($lastOption === null) { |
118 | 118 | $upper = strtoupper($token->token); |
119 | - if (! isset($options[$upper])) { |
|
119 | + if (!isset($options[$upper])) { |
|
120 | 120 | // There is no option to be processed. |
121 | 121 | break; |
122 | 122 | } |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | } |
154 | 154 | |
155 | 155 | if ($state === 0) { |
156 | - if (! is_array($lastOption)) { |
|
156 | + if (!is_array($lastOption)) { |
|
157 | 157 | // This is a just keyword option without any value. |
158 | 158 | // This is the beginning and the end of it. |
159 | 159 | $ret->options[$lastOptionId] = $token->value; |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | $ret->options[$lastOptionId]['expr'] .= $token->token; |
231 | 231 | |
232 | 232 | if ( |
233 | - ! (($token->token === '(') && ($brackets === 1) |
|
233 | + !(($token->token === '(') && ($brackets === 1) |
|
234 | 234 | || (($token->token === ')') && ($brackets === 0))) |
235 | 235 | ) { |
236 | 236 | // First pair of brackets is being skipped. |
@@ -286,12 +286,12 @@ discard block |
||
286 | 286 | |
287 | 287 | $options = []; |
288 | 288 | foreach ($component->options as $option) { |
289 | - if (! is_array($option)) { |
|
289 | + if (!is_array($option)) { |
|
290 | 290 | $options[] = $option; |
291 | 291 | } else { |
292 | 292 | $options[] = $option['name'] |
293 | - . (! empty($option['equals']) ? '=' : ' ') |
|
294 | - . (! empty($option['expr']) ? $option['expr'] : $option['value']); |
|
293 | + . (!empty($option['equals']) ? '=' : ' ') |
|
294 | + . (!empty($option['expr']) ? $option['expr'] : $option['value']); |
|
295 | 295 | } |
296 | 296 | } |
297 | 297 | |
@@ -311,10 +311,10 @@ discard block |
||
311 | 311 | { |
312 | 312 | foreach ($this->options as $option) { |
313 | 313 | if (is_array($option)) { |
314 | - if (! strcasecmp($key, $option['name'])) { |
|
314 | + if (!strcasecmp($key, $option['name'])) { |
|
315 | 315 | return $getExpr ? $option['expr'] : $option['value']; |
316 | 316 | } |
317 | - } elseif (! strcasecmp($key, $option)) { |
|
317 | + } elseif (!strcasecmp($key, $option)) { |
|
318 | 318 | return true; |
319 | 319 | } |
320 | 320 | } |
@@ -333,12 +333,12 @@ discard block |
||
333 | 333 | { |
334 | 334 | foreach ($this->options as $idx => $option) { |
335 | 335 | if (is_array($option)) { |
336 | - if (! strcasecmp($key, $option['name'])) { |
|
336 | + if (!strcasecmp($key, $option['name'])) { |
|
337 | 337 | unset($this->options[$idx]); |
338 | 338 | |
339 | 339 | return true; |
340 | 340 | } |
341 | - } elseif (! strcasecmp($key, $option)) { |
|
341 | + } elseif (!strcasecmp($key, $option)) { |
|
342 | 342 | unset($this->options[$idx]); |
343 | 343 | |
344 | 344 | return true; |
@@ -264,7 +264,7 @@ |
||
264 | 264 | public static function build($component): string |
265 | 265 | { |
266 | 266 | if ($component->dest instanceof Expression) { |
267 | - $columns = ! empty($component->columns) ? '(`' . implode('`, `', $component->columns) . '`)' : ''; |
|
267 | + $columns = !empty($component->columns) ? '(`' . implode('`, `', $component->columns) . '`)' : ''; |
|
268 | 268 | |
269 | 269 | return $component->dest . $columns; |
270 | 270 | } |
@@ -145,7 +145,7 @@ |
||
145 | 145 | public static function build($component): string |
146 | 146 | { |
147 | 147 | $tmp = ''; |
148 | - if (! empty($component->inOut)) { |
|
148 | + if (!empty($component->inOut)) { |
|
149 | 149 | $tmp .= $component->inOut . ' '; |
150 | 150 | } |
151 | 151 |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | } |
191 | 191 | } |
192 | 192 | |
193 | - if (! empty($expr->type)) { |
|
193 | + if (!empty($expr->type)) { |
|
194 | 194 | $ret[] = $expr; |
195 | 195 | } |
196 | 196 | |
@@ -212,9 +212,9 @@ discard block |
||
212 | 212 | $ret = []; |
213 | 213 | foreach ($component as $c) { |
214 | 214 | $ret[] = array_search($c->type, static::$joins) . ' ' . $c->expr |
215 | - . (! empty($c->on) |
|
215 | + . (!empty($c->on) |
|
216 | 216 | ? ' ON ' . Condition::buildAll($c->on) : '') |
217 | - . (! empty($c->using) |
|
217 | + . (!empty($c->using) |
|
218 | 218 | ? ' USING ' . ArrayObj::build($c->using) : ''); |
219 | 219 | } |
220 | 220 |
@@ -50,7 +50,7 @@ |
||
50 | 50 | */ |
51 | 51 | public static function build($component): string |
52 | 52 | { |
53 | - if (! isset($component->statement)) { |
|
53 | + if (!isset($component->statement)) { |
|
54 | 54 | throw new RuntimeException('No statement inside WITH'); |
55 | 55 | } |
56 | 56 |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * |
64 | 64 | * @var ArrayObj[]|null |
65 | 65 | */ |
66 | - public array|null $values = null; |
|
66 | + public array | null $values = null; |
|
67 | 67 | |
68 | 68 | /** |
69 | 69 | * If SET clause is present |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | * |
72 | 72 | * @var SetOperation[]|null |
73 | 73 | */ |
74 | - public array|null $set = null; |
|
74 | + public array | null $set = null; |
|
75 | 75 | |
76 | 76 | /** |
77 | 77 | * If SELECT clause is present |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | } elseif (($token->value === ',') && ($brackets === 0)) { |
425 | 425 | break; |
426 | 426 | } |
427 | - } elseif (! self::checkIfTokenQuotedSymbol($token)) { |
|
427 | + } elseif (!self::checkIfTokenQuotedSymbol($token)) { |
|
428 | 428 | // If the current token is "SET" or "ENUM", we want to avoid the token between their parenthesis in |
429 | 429 | // the unknown tokens. |
430 | 430 | if (in_array($token->value, ['SET', 'ENUM'], true)) { |
@@ -443,7 +443,7 @@ discard block |
||
443 | 443 | ); |
444 | 444 | break; |
445 | 445 | } |
446 | - } elseif (! empty(Parser::$statementParsers[$token->value])) { |
|
446 | + } elseif (!empty(Parser::$statementParsers[$token->value])) { |
|
447 | 447 | // We have reached the end of ALTER operation and suddenly found |
448 | 448 | // a start to new statement, but have not found a delimiter between them |
449 | 449 | $parser->error( |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | } elseif ( |
455 | 455 | (array_key_exists($arrayKey, self::$databaseOptions) |
456 | 456 | || array_key_exists($arrayKey, self::$tableOptions)) |
457 | - && ! self::checkIfColumnDefinitionKeyword($arrayKey) |
|
457 | + && !self::checkIfColumnDefinitionKeyword($arrayKey) |
|
458 | 458 | ) { |
459 | 459 | // This alter operation has finished, which means a comma |
460 | 460 | // was missing before start of new alter operation |
@@ -30,7 +30,7 @@ |
||
30 | 30 | * Test for loading closest SQL context |
31 | 31 | */ |
32 | 32 | #[DataProvider('contextLoadingProvider')] |
33 | - public function testLoadClosest(string $context, string|null $expected): void |
|
33 | + public function testLoadClosest(string $context, string | null $expected): void |
|
34 | 34 | { |
35 | 35 | $this->assertEquals($expected, Context::loadClosest($context)); |
36 | 36 | if ($expected !== null) { |
@@ -86,7 +86,7 @@ |
||
86 | 86 | * Test access to string. |
87 | 87 | */ |
88 | 88 | #[DataProvider('utf8StringsProvider')] |
89 | - public function testAccess(string $text, string|null $pos10, string|null $pos20): void |
|
89 | + public function testAccess(string $text, string | null $pos10, string | null $pos20): void |
|
90 | 90 | { |
91 | 91 | $str = new UtfString($text); |
92 | 92 | $this->assertEquals($pos10, $str->offsetGet(10)); |