@@ -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)); |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | { |
189 | 189 | $this->str = $str; |
190 | 190 | $this->byteLen = mb_strlen($str, '8bit'); |
191 | - if (! mb_check_encoding($str, 'UTF-8')) { |
|
191 | + if (!mb_check_encoding($str, 'UTF-8')) { |
|
192 | 192 | $this->charLen = 0; |
193 | 193 | } else { |
194 | 194 | $this->charLen = mb_strlen($str, 'UTF-8'); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | * |
211 | 211 | * @param int $offset the offset to be returned |
212 | 212 | */ |
213 | - public function offsetGet($offset): string|null |
|
213 | + public function offsetGet($offset): string | null |
|
214 | 214 | { |
215 | 215 | if (($offset < 0) || ($offset >= $this->charLen)) { |
216 | 216 | return null; |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | // Use the default ASCII map as queries are mostly ASCII chars |
287 | 287 | // ord($byte) has a performance cost |
288 | 288 | |
289 | - if (! isset(static::$asciiMap[$byte])) { |
|
289 | + if (!isset(static::$asciiMap[$byte])) { |
|
290 | 290 | // Complete the cache with missing items |
291 | 291 | static::$asciiMap[$byte] = ord($byte); |
292 | 292 | } |