@@ -150,11 +150,11 @@ discard block |
||
| 150 | 150 | * @param Reference|null $references references |
| 151 | 151 | */ |
| 152 | 152 | public function __construct( |
| 153 | - string|null $name = null, |
|
| 154 | - OptionsArray|null $options = null, |
|
| 155 | - DataType|Key|null $type = null, |
|
| 153 | + string | null $name = null, |
|
| 154 | + OptionsArray | null $options = null, |
|
| 155 | + DataType | Key | null $type = null, |
|
| 156 | 156 | bool $isConstraint = false, |
| 157 | - Reference|null $references = null, |
|
| 157 | + Reference | null $references = null, |
|
| 158 | 158 | ) { |
| 159 | 159 | $this->name = $name; |
| 160 | 160 | $this->options = $options; |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | $state = 4; |
| 237 | 237 | } elseif ($token->type === TokenType::Symbol || $token->type === TokenType::None) { |
| 238 | 238 | $expr->name = $token->value; |
| 239 | - if (! $expr->isConstraint) { |
|
| 239 | + if (!$expr->isConstraint) { |
|
| 240 | 240 | $state = 2; |
| 241 | 241 | } |
| 242 | 242 | } elseif ($token->type === TokenType::Keyword) { |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | |
| 278 | 278 | $state = 5; |
| 279 | 279 | } elseif ($state === 5) { |
| 280 | - if (! empty($expr->type) || ! empty($expr->key)) { |
|
| 280 | + if (!empty($expr->type) || !empty($expr->key)) { |
|
| 281 | 281 | $ret[] = $expr; |
| 282 | 282 | } |
| 283 | 283 | |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | } |
| 298 | 298 | |
| 299 | 299 | // Last iteration was not saved. |
| 300 | - if (! empty($expr->type) || ! empty($expr->key)) { |
|
| 300 | + if (!empty($expr->type) || !empty($expr->key)) { |
|
| 301 | 301 | $ret[] = $expr; |
| 302 | 302 | } |
| 303 | 303 | |
@@ -322,16 +322,16 @@ discard block |
||
| 322 | 322 | $tmp .= Context::escape($this->name) . ' '; |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | - if (! empty($this->type)) { |
|
| 325 | + if (!empty($this->type)) { |
|
| 326 | 326 | $this->type->lowercase = true; |
| 327 | 327 | $tmp .= $this->type->build() . ' '; |
| 328 | 328 | } |
| 329 | 329 | |
| 330 | - if (! empty($this->key)) { |
|
| 330 | + if (!empty($this->key)) { |
|
| 331 | 331 | $tmp .= $this->key . ' '; |
| 332 | 332 | } |
| 333 | 333 | |
| 334 | - if (! empty($this->references)) { |
|
| 334 | + if (!empty($this->references)) { |
|
| 335 | 335 | $tmp .= 'REFERENCES ' . $this->references . ' '; |
| 336 | 336 | } |
| 337 | 337 | |
@@ -264,9 +264,9 @@ discard block |
||
| 264 | 264 | * @param Token[] $unknown unparsed tokens found at the end of operation |
| 265 | 265 | */ |
| 266 | 266 | public function __construct( |
| 267 | - OptionsArray|null $options = null, |
|
| 268 | - Expression|string|null $field = null, |
|
| 269 | - array|null $partitions = null, |
|
| 267 | + OptionsArray | null $options = null, |
|
| 268 | + Expression | string | null $field = null, |
|
| 269 | + array | null $partitions = null, |
|
| 270 | 270 | public array $unknown = [], |
| 271 | 271 | ) { |
| 272 | 272 | $this->partitions = $partitions; |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | } elseif (($token->value === ',') && ($brackets === 0)) { |
| 402 | 402 | break; |
| 403 | 403 | } |
| 404 | - } elseif (! self::checkIfTokenQuotedSymbol($token) && $token->type !== TokenType::String) { |
|
| 404 | + } elseif (!self::checkIfTokenQuotedSymbol($token) && $token->type !== TokenType::String) { |
|
| 405 | 405 | if (isset(Parser::STATEMENT_PARSERS[$arrayKey]) && Parser::STATEMENT_PARSERS[$arrayKey] !== '') { |
| 406 | 406 | $list->idx++; // Ignore the current token |
| 407 | 407 | $nextToken = $list->getNext(); |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | } elseif ( |
| 425 | 425 | (array_key_exists($arrayKey, self::DATABASE_OPTIONS) |
| 426 | 426 | || array_key_exists($arrayKey, self::TABLE_OPTIONS)) |
| 427 | - && ! self::checkIfColumnDefinitionKeyword($arrayKey) |
|
| 427 | + && !self::checkIfColumnDefinitionKeyword($arrayKey) |
|
| 428 | 428 | ) { |
| 429 | 429 | // This alter operation has finished, which means a comma |
| 430 | 430 | // was missing before start of new alter operation |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | |
| 54 | 54 | /** @param GroupKeyword|array<GroupKeyword> $component */ |
| 55 | 55 | #[DataProvider('provideExpressions')] |
| 56 | - public function testBuild(GroupKeyword|array $component, string $expected): void |
|
| 56 | + public function testBuild(GroupKeyword | array $component, string $expected): void |
|
| 57 | 57 | { |
| 58 | 58 | if (is_array($component)) { |
| 59 | 59 | $this->assertSame($expected, GroupKeyword::buildAll($component)); |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | * : list<array{string, Token, int}> |
| 60 | 60 | * ) |
| 61 | 61 | */ |
| 62 | - public function getErrorsAsArray(Lexer|Parser $obj): array |
|
| 62 | + public function getErrorsAsArray(Lexer | Parser $obj): array |
|
| 63 | 63 | { |
| 64 | 64 | $ret = []; |
| 65 | 65 | if ($obj instanceof Lexer) { |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | /** @param array<string, bool|string>|false $getopt */ |
| 52 | 52 | #[DataProvider('highlightParamsProvider')] |
| 53 | - public function testRunHighlight(array|false $getopt, string $output, int $result): void |
|
| 53 | + public function testRunHighlight(array | false $getopt, string $output, int $result): void |
|
| 54 | 54 | { |
| 55 | 55 | $cli = $this->getCLI($getopt); |
| 56 | 56 | $this->expectOutputString($output); |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | |
| 123 | 123 | /** @param array<string, bool|string>|false $getopt */ |
| 124 | 124 | #[DataProvider('highlightParamsStdInProvider')] |
| 125 | - public function testRunHighlightStdIn(string $input, array|false $getopt, string $output, int $result): void |
|
| 125 | + public function testRunHighlightStdIn(string $input, array | false $getopt, string $output, int $result): void |
|
| 126 | 126 | { |
| 127 | 127 | $cli = $this->getCLIStdIn($input, $getopt); |
| 128 | 128 | $this->expectOutputString($output); |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | |
| 188 | 188 | /** @param array<string, bool|string>|false $getopt */ |
| 189 | 189 | #[DataProvider('lintParamsStdInProvider')] |
| 190 | - public function testRunLintFromStdIn(string $input, array|false $getopt, string $output, int $result): void |
|
| 190 | + public function testRunLintFromStdIn(string $input, array | false $getopt, string $output, int $result): void |
|
| 191 | 191 | { |
| 192 | 192 | $cli = $this->getCLIStdIn($input, $getopt); |
| 193 | 193 | $this->expectOutputString($output); |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | |
| 250 | 250 | /** @param array<string, bool|string>|false $getopt */ |
| 251 | 251 | #[DataProvider('lintParamsProvider')] |
| 252 | - public function testRunLint(array|false $getopt, string $output, int $result): void |
|
| 252 | + public function testRunLint(array | false $getopt, string $output, int $result): void |
|
| 253 | 253 | { |
| 254 | 254 | $cli = $this->getCLI($getopt); |
| 255 | 255 | $this->expectOutputString($output); |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | |
| 314 | 314 | /** @param array<string, bool|string>|false $getopt */ |
| 315 | 315 | #[DataProvider('tokenizeParamsProvider')] |
| 316 | - public function testRunTokenize(array|false $getopt, string $output, int $result): void |
|
| 316 | + public function testRunTokenize(array | false $getopt, string $output, int $result): void |
|
| 317 | 317 | { |
| 318 | 318 | $cli = $this->getCLI($getopt); |
| 319 | 319 | $this->expectOutputString($output); |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | |
| 366 | 366 | /** @param array<string, bool|string>|false $getopt */ |
| 367 | 367 | #[DataProvider('tokenizeParamsStdInProvider')] |
| 368 | - public function testRunTokenizeStdIn(string $input, array|false $getopt, string $output, int $result): void |
|
| 368 | + public function testRunTokenizeStdIn(string $input, array | false $getopt, string $output, int $result): void |
|
| 369 | 369 | { |
| 370 | 370 | $cli = $this->getCLIStdIn($input, $getopt); |
| 371 | 371 | $this->expectOutputString($output); |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * Test for loading closest SQL context |
| 36 | 36 | */ |
| 37 | 37 | #[DataProvider('contextLoadingProvider')] |
| 38 | - public function testLoadClosest(string $context, string|null $expected): void |
|
| 38 | + public function testLoadClosest(string $context, string | null $expected): void |
|
| 39 | 39 | { |
| 40 | 40 | $this->assertEquals($expected, Context::loadClosest($context)); |
| 41 | 41 | if ($expected !== null) { |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | #[DataProvider('providerForTestMode')] |
| 121 | - public function testMode(int|string $mode, int $expected): void |
|
| 121 | + public function testMode(int | string $mode, int $expected): void |
|
| 122 | 122 | { |
| 123 | 123 | Context::setMode($mode); |
| 124 | 124 | $this->assertSame($expected, Context::getMode()); |