@@ -19,32 +19,32 @@ discard block |
||
| 19 | 19 | /** |
| 20 | 20 | * The name of the new column. |
| 21 | 21 | */ |
| 22 | - public string|null $name = null; |
|
| 22 | + public string | null $name = null; |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * Whether this field is a constraint or not. |
| 26 | 26 | */ |
| 27 | - public bool|null $isConstraint = null; |
|
| 27 | + public bool | null $isConstraint = null; |
|
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * The data type of thew new column. |
| 31 | 31 | */ |
| 32 | - public DataType|null $type = null; |
|
| 32 | + public DataType | null $type = null; |
|
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | 35 | * The key. |
| 36 | 36 | */ |
| 37 | - public Key|null $key = null; |
|
| 37 | + public Key | null $key = null; |
|
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | 40 | * The table that is referenced. |
| 41 | 41 | */ |
| 42 | - public Reference|null $references = null; |
|
| 42 | + public Reference | null $references = null; |
|
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | 45 | * The options of this field. |
| 46 | 46 | */ |
| 47 | - public OptionsArray|null $options = null; |
|
| 47 | + public OptionsArray | null $options = null; |
|
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | 50 | * @param string|null $name the name of the field |
@@ -54,11 +54,11 @@ discard block |
||
| 54 | 54 | * @param Reference|null $references references |
| 55 | 55 | */ |
| 56 | 56 | public function __construct( |
| 57 | - string|null $name = null, |
|
| 58 | - OptionsArray|null $options = null, |
|
| 59 | - DataType|Key|null $type = null, |
|
| 57 | + string | null $name = null, |
|
| 58 | + OptionsArray | null $options = null, |
|
| 59 | + DataType | Key | null $type = null, |
|
| 60 | 60 | bool $isConstraint = false, |
| 61 | - Reference|null $references = null, |
|
| 61 | + Reference | null $references = null, |
|
| 62 | 62 | ) { |
| 63 | 63 | $this->name = $name; |
| 64 | 64 | $this->options = $options; |
@@ -83,16 +83,16 @@ discard block |
||
| 83 | 83 | $tmp .= Context::escape($this->name) . ' '; |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - if (! empty($this->type)) { |
|
| 86 | + if (!empty($this->type)) { |
|
| 87 | 87 | $this->type->lowercase = true; |
| 88 | 88 | $tmp .= $this->type->build() . ' '; |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | - if (! empty($this->key)) { |
|
| 91 | + if (!empty($this->key)) { |
|
| 92 | 92 | $tmp .= $this->key . ' '; |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | - if (! empty($this->references)) { |
|
| 95 | + if (!empty($this->references)) { |
|
| 96 | 96 | $tmp .= 'REFERENCES ' . $this->references . ' '; |
| 97 | 97 | } |
| 98 | 98 | |
@@ -19,19 +19,19 @@ discard block |
||
| 19 | 19 | /** |
| 20 | 20 | * Options of this operation. |
| 21 | 21 | */ |
| 22 | - public OptionsArray|null $options = null; |
|
| 22 | + public OptionsArray | null $options = null; |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * The altered field. |
| 26 | 26 | */ |
| 27 | - public Expression|string|null $field = null; |
|
| 27 | + public Expression | string | null $field = null; |
|
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * The partitions. |
| 31 | 31 | * |
| 32 | 32 | * @var PartitionDefinition[]|null |
| 33 | 33 | */ |
| 34 | - public array|null $partitions = null; |
|
| 34 | + public array | null $partitions = null; |
|
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * @param OptionsArray|null $options options of alter operation |
@@ -40,9 +40,9 @@ discard block |
||
| 40 | 40 | * @param Token[] $unknown unparsed tokens found at the end of operation |
| 41 | 41 | */ |
| 42 | 42 | public function __construct( |
| 43 | - OptionsArray|null $options = null, |
|
| 44 | - Expression|string|null $field = null, |
|
| 45 | - array|null $partitions = null, |
|
| 43 | + OptionsArray | null $options = null, |
|
| 44 | + Expression | string | null $field = null, |
|
| 45 | + array | null $partitions = null, |
|
| 46 | 46 | public array $unknown = [], |
| 47 | 47 | ) { |
| 48 | 48 | $this->partitions = $partitions; |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | if ( |
| 122 | - ! $hasSubQuery |
|
| 122 | + !$hasSubQuery |
|
| 123 | 123 | && $token->keyword !== null && $token->type === TokenType::Keyword |
| 124 | 124 | && $brackets > 0 |
| 125 | 125 | && (Parser::STATEMENT_PARSERS[$token->keyword] ?? '') !== '' |
@@ -156,13 +156,13 @@ discard block |
||
| 156 | 156 | if ( |
| 157 | 157 | ($token->type === TokenType::Keyword) |
| 158 | 158 | && ($token->flags & Token::FLAG_KEYWORD_RESERVED) |
| 159 | - && ! ($token->flags & Token::FLAG_KEYWORD_FUNCTION) |
|
| 159 | + && !($token->flags & Token::FLAG_KEYWORD_FUNCTION) |
|
| 160 | 160 | ) { |
| 161 | 161 | if ($token->value === 'BETWEEN') { |
| 162 | 162 | $betweenBefore = true; |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - if ($brackets === 0 && ! in_array($token->value, self::ALLOWED_KEYWORDS, true)) { |
|
| 165 | + if ($brackets === 0 && !in_array($token->value, self::ALLOWED_KEYWORDS, true)) { |
|
| 166 | 166 | break; |
| 167 | 167 | } |
| 168 | 168 | } |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | --$brackets; |
| 183 | - } elseif (! $hasSubQuery && in_array($token->value, self::COMPARISON_OPERATORS, true)) { |
|
| 183 | + } elseif (!$hasSubQuery && in_array($token->value, self::COMPARISON_OPERATORS, true)) { |
|
| 184 | 184 | $expr->operator = $token->value; |
| 185 | 185 | } |
| 186 | 186 | } |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | public string $rightOperand = ''; |
| 33 | 33 | |
| 34 | 34 | /** @param string $expr the condition or the operator */ |
| 35 | - public function __construct(string|null $expr = null) |
|
| 35 | + public function __construct(string | null $expr = null) |
|
| 36 | 36 | { |
| 37 | 37 | $this->expr = trim((string) $expr); |
| 38 | 38 | } |