@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | $state = 4; |
| 243 | 243 | } elseif ($token->type === Token::TYPE_SYMBOL || $token->type === Token::TYPE_NONE) { |
| 244 | 244 | $expr->name = $token->value; |
| 245 | - if (! $expr->isConstraint) { |
|
| 245 | + if (!$expr->isConstraint) { |
|
| 246 | 246 | $state = 2; |
| 247 | 247 | } |
| 248 | 248 | } elseif ($token->type === Token::TYPE_KEYWORD) { |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | |
| 284 | 284 | $state = 5; |
| 285 | 285 | } elseif ($state === 5) { |
| 286 | - if (! empty($expr->type) || ! empty($expr->key)) { |
|
| 286 | + if (!empty($expr->type) || !empty($expr->key)) { |
|
| 287 | 287 | $ret[] = $expr; |
| 288 | 288 | } |
| 289 | 289 | |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | } |
| 304 | 304 | |
| 305 | 305 | // Last iteration was not saved. |
| 306 | - if (! empty($expr->type) || ! empty($expr->key)) { |
|
| 306 | + if (!empty($expr->type) || !empty($expr->key)) { |
|
| 307 | 307 | $ret[] = $expr; |
| 308 | 308 | } |
| 309 | 309 | |
@@ -328,16 +328,16 @@ discard block |
||
| 328 | 328 | $tmp .= Context::escape($this->name) . ' '; |
| 329 | 329 | } |
| 330 | 330 | |
| 331 | - if (! empty($this->type)) { |
|
| 331 | + if (!empty($this->type)) { |
|
| 332 | 332 | $this->type->lowercase = true; |
| 333 | 333 | $tmp .= $this->type->build() . ' '; |
| 334 | 334 | } |
| 335 | 335 | |
| 336 | - if (! empty($this->key)) { |
|
| 336 | + if (!empty($this->key)) { |
|
| 337 | 337 | $tmp .= $this->key . ' '; |
| 338 | 338 | } |
| 339 | 339 | |
| 340 | - if (! empty($this->references)) { |
|
| 340 | + if (!empty($this->references)) { |
|
| 341 | 341 | $tmp .= 'REFERENCES ' . $this->references . ' '; |
| 342 | 342 | } |
| 343 | 343 | |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | * |
| 281 | 281 | * Used by all `CREATE` statements. |
| 282 | 282 | */ |
| 283 | - public Expression|null $name = null; |
|
| 283 | + public Expression | null $name = null; |
|
| 284 | 284 | |
| 285 | 285 | /** |
| 286 | 286 | * The options of the entity (table, procedure, function, etc.). |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | public function build(): string |
| 410 | 410 | { |
| 411 | 411 | $fields = ''; |
| 412 | - if (! empty($this->fields)) { |
|
| 412 | + if (!empty($this->fields)) { |
|
| 413 | 413 | if (is_array($this->fields)) { |
| 414 | 414 | $fields = CreateDefinition::buildAll($this->fields) . ' '; |
| 415 | 415 | } elseif ($this->fields instanceof ArrayObj) { |
@@ -448,23 +448,23 @@ discard block |
||
| 448 | 448 | |
| 449 | 449 | $partition = ''; |
| 450 | 450 | |
| 451 | - if (! empty($this->partitionBy)) { |
|
| 451 | + if (!empty($this->partitionBy)) { |
|
| 452 | 452 | $partition .= "\nPARTITION BY " . $this->partitionBy; |
| 453 | 453 | } |
| 454 | 454 | |
| 455 | - if (! empty($this->partitionsNum)) { |
|
| 455 | + if (!empty($this->partitionsNum)) { |
|
| 456 | 456 | $partition .= "\nPARTITIONS " . $this->partitionsNum; |
| 457 | 457 | } |
| 458 | 458 | |
| 459 | - if (! empty($this->subpartitionBy)) { |
|
| 459 | + if (!empty($this->subpartitionBy)) { |
|
| 460 | 460 | $partition .= "\nSUBPARTITION BY " . $this->subpartitionBy; |
| 461 | 461 | } |
| 462 | 462 | |
| 463 | - if (! empty($this->subpartitionsNum)) { |
|
| 463 | + if (!empty($this->subpartitionsNum)) { |
|
| 464 | 464 | $partition .= "\nSUBPARTITIONS " . $this->subpartitionsNum; |
| 465 | 465 | } |
| 466 | 466 | |
| 467 | - if (! empty($this->partitions)) { |
|
| 467 | + if (!empty($this->partitions)) { |
|
| 468 | 468 | $partition .= "\n" . PartitionDefinition::buildAll($this->partitions); |
| 469 | 469 | } |
| 470 | 470 | |
@@ -488,7 +488,7 @@ discard block |
||
| 488 | 488 | . $this->options->build() . ' ' |
| 489 | 489 | . $this->name->build() . ' ' |
| 490 | 490 | . $fields . ' AS ' . $builtStatement |
| 491 | - . (! empty($this->body) ? TokensList::build($this->body) : '') . ' ' |
|
| 491 | + . (!empty($this->body) ? TokensList::build($this->body) : '') . ' ' |
|
| 492 | 492 | . ($this->entityOptions?->build() ?? ''); |
| 493 | 493 | } |
| 494 | 494 | |
@@ -658,7 +658,7 @@ discard block |
||
| 658 | 658 | $token = $list->getNextOfType(Token::TYPE_NUMBER); |
| 659 | 659 | --$list->idx; // `getNextOfType` also advances one position. |
| 660 | 660 | $this->subpartitionsNum = $token->value; |
| 661 | - } elseif (! empty($field)) { |
|
| 661 | + } elseif (!empty($field)) { |
|
| 662 | 662 | /* |
| 663 | 663 | * Handling the content of `PARTITION BY` and `SUBPARTITION BY`. |
| 664 | 664 | */ |
@@ -687,7 +687,7 @@ discard block |
||
| 687 | 687 | $field = null; |
| 688 | 688 | } |
| 689 | 689 | } elseif (($token->type === Token::TYPE_OPERATOR) && ($token->value === '(')) { |
| 690 | - if (! empty($this->partitionBy)) { |
|
| 690 | + if (!empty($this->partitionBy)) { |
|
| 691 | 691 | $this->partitions = ArrayObj::parse( |
| 692 | 692 | $parser, |
| 693 | 693 | $list, |