@@ -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 |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | /** |
| 63 | 63 | * The current status of the parser. |
| 64 | 64 | */ |
| 65 | - public int|null $status = null; |
|
| 65 | + public int | null $status = null; |
|
| 66 | 66 | |
| 67 | 67 | /** |
| 68 | 68 | * The last incomplete query that was extracted. |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | * |
| 110 | 110 | * @param bool $end whether the end of the buffer was reached |
| 111 | 111 | */ |
| 112 | - public function extract(bool $end = false): string|false |
|
| 112 | + public function extract(bool $end = false): string | false |
|
| 113 | 113 | { |
| 114 | 114 | /** |
| 115 | 115 | * The last parsed position. |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | |
| 302 | 302 | // Parsing the delimiter. |
| 303 | 303 | $delimiter = ''; |
| 304 | - while (($i < $len) && (! Context::isWhitespace($this->query[$i]))) { |
|
| 304 | + while (($i < $len) && (!Context::isWhitespace($this->query[$i]))) { |
|
| 305 | 305 | $delimiter .= $this->query[$i++]; |
| 306 | 306 | } |
| 307 | 307 | |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | |
| 317 | 317 | // Whether this statement should be returned or not. |
| 318 | 318 | $ret = ''; |
| 319 | - if (! empty($this->options['parse_delimiter'])) { |
|
| 319 | + if (!empty($this->options['parse_delimiter'])) { |
|
| 320 | 320 | // Appending the `DELIMITER` statement that was just |
| 321 | 321 | // found to the current statement. |
| 322 | 322 | $ret = trim( |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | $ret = $this->current; |
| 360 | 360 | |
| 361 | 361 | // If needed, adds a delimiter at the end of the statement. |
| 362 | - if (! empty($this->options['add_delimiter'])) { |
|
| 362 | + if (!empty($this->options['add_delimiter'])) { |
|
| 363 | 363 | $ret .= $this->delimiter; |
| 364 | 364 | } |
| 365 | 365 | |