@@ -14,18 +14,18 @@ |
||
| 14 | 14 | /** |
| 15 | 15 | * The old table name. |
| 16 | 16 | */ |
| 17 | - public Expression|null $old = null; |
|
| 17 | + public Expression | null $old = null; |
|
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * The new table name. |
| 21 | 21 | */ |
| 22 | - public Expression|null $new = null; |
|
| 22 | + public Expression | null $new = null; |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * @param Expression|null $old old expression |
| 26 | 26 | * @param Expression|null $new new expression containing new name |
| 27 | 27 | */ |
| 28 | - public function __construct(Expression|null $old = null, Expression|null $new = null) |
|
| 28 | + public function __construct(Expression | null $old = null, Expression | null $new = null) |
|
| 29 | 29 | { |
| 30 | 30 | $this->old = $old; |
| 31 | 31 | $this->new = $new; |
@@ -20,37 +20,37 @@ discard block |
||
| 20 | 20 | /** |
| 21 | 21 | * The name of this database. |
| 22 | 22 | */ |
| 23 | - public string|null $database = null; |
|
| 23 | + public string | null $database = null; |
|
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * The name of this table. |
| 27 | 27 | */ |
| 28 | - public string|null $table = null; |
|
| 28 | + public string | null $table = null; |
|
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * The name of the column. |
| 32 | 32 | */ |
| 33 | - public string|null $column = null; |
|
| 33 | + public string | null $column = null; |
|
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | * The sub-expression. |
| 37 | 37 | */ |
| 38 | - public string|null $expr = ''; |
|
| 38 | + public string | null $expr = ''; |
|
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | 41 | * The alias of this expression. |
| 42 | 42 | */ |
| 43 | - public string|null $alias = null; |
|
| 43 | + public string | null $alias = null; |
|
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * The name of the function. |
| 47 | 47 | */ |
| 48 | - public string|null $function = null; |
|
| 48 | + public string | null $function = null; |
|
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * The type of subquery. |
| 52 | 52 | */ |
| 53 | - public string|null $subquery = null; |
|
| 53 | + public string | null $subquery = null; |
|
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | 56 | * Syntax: |
@@ -68,10 +68,10 @@ discard block |
||
| 68 | 68 | * @param string|null $alias the name of the alias |
| 69 | 69 | */ |
| 70 | 70 | public function __construct( |
| 71 | - string|null $database = null, |
|
| 72 | - string|null $table = null, |
|
| 73 | - string|null $column = null, |
|
| 74 | - string|null $alias = null, |
|
| 71 | + string | null $database = null, |
|
| 72 | + string | null $table = null, |
|
| 73 | + string | null $column = null, |
|
| 74 | + string | null $alias = null, |
|
| 75 | 75 | ) { |
| 76 | 76 | if (($column === null) && ($alias === null)) { |
| 77 | 77 | $this->expr = $database; // case 1 |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | $ret = implode('.', Context::escapeAll($fields)); |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | - if (! empty($this->alias)) { |
|
| 108 | + if (!empty($this->alias)) { |
|
| 109 | 109 | $ret .= ' AS ' . Context::escape($this->alias); |
| 110 | 110 | } |
| 111 | 111 | |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | /** |
| 21 | 21 | * The name of this key. |
| 22 | 22 | */ |
| 23 | - public string|null $name = null; |
|
| 23 | + public string | null $name = null; |
|
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * The key columns |
@@ -33,17 +33,17 @@ discard block |
||
| 33 | 33 | /** |
| 34 | 34 | * The type of this key. |
| 35 | 35 | */ |
| 36 | - public string|null $type = null; |
|
| 36 | + public string | null $type = null; |
|
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | * The expression if the Key is not using column names |
| 40 | 40 | */ |
| 41 | - public string|null $expr = null; |
|
| 41 | + public string | null $expr = null; |
|
| 42 | 42 | |
| 43 | 43 | /** |
| 44 | 44 | * The options of this key or null if none where found. |
| 45 | 45 | */ |
| 46 | - public OptionsArray|null $options = null; |
|
| 46 | + public OptionsArray | null $options = null; |
|
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | 49 | * @param string|null $name the name of the key |
@@ -53,10 +53,10 @@ discard block |
||
| 53 | 53 | * @phpstan-param array{name?: string, length?: int, order?: string}[] $columns |
| 54 | 54 | */ |
| 55 | 55 | public function __construct( |
| 56 | - string|null $name = null, |
|
| 56 | + string | null $name = null, |
|
| 57 | 57 | array $columns = [], |
| 58 | - string|null $type = null, |
|
| 59 | - OptionsArray|null $options = null, |
|
| 58 | + string | null $type = null, |
|
| 59 | + OptionsArray | null $options = null, |
|
| 60 | 60 | ) { |
| 61 | 61 | $this->name = $name; |
| 62 | 62 | $this->columns = $columns; |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | public function build(): string |
| 68 | 68 | { |
| 69 | 69 | $ret = $this->type . ' '; |
| 70 | - if (! empty($this->name)) { |
|
| 70 | + if (!empty($this->name)) { |
|
| 71 | 71 | $ret .= Context::escape($this->name) . ' '; |
| 72 | 72 | } |
| 73 | 73 | |
@@ -64,34 +64,34 @@ discard block |
||
| 64 | 64 | /** |
| 65 | 65 | * Whether this entry is a subpartition or a partition. |
| 66 | 66 | */ |
| 67 | - public bool|null $isSubpartition = null; |
|
| 67 | + public bool | null $isSubpartition = null; |
|
| 68 | 68 | |
| 69 | 69 | /** |
| 70 | 70 | * The name of this partition. |
| 71 | 71 | */ |
| 72 | - public string|null $name = null; |
|
| 72 | + public string | null $name = null; |
|
| 73 | 73 | |
| 74 | 74 | /** |
| 75 | 75 | * The type of this partition (what follows the `VALUES` keyword). |
| 76 | 76 | */ |
| 77 | - public string|null $type = null; |
|
| 77 | + public string | null $type = null; |
|
| 78 | 78 | |
| 79 | 79 | /** |
| 80 | 80 | * The expression used to defined this partition. |
| 81 | 81 | */ |
| 82 | - public Expression|string|null $expr = null; |
|
| 82 | + public Expression | string | null $expr = null; |
|
| 83 | 83 | |
| 84 | 84 | /** |
| 85 | 85 | * The subpartitions of this partition. |
| 86 | 86 | * |
| 87 | 87 | * @var PartitionDefinition[]|null |
| 88 | 88 | */ |
| 89 | - public array|null $subpartitions = null; |
|
| 89 | + public array | null $subpartitions = null; |
|
| 90 | 90 | |
| 91 | 91 | /** |
| 92 | 92 | * The options of this field. |
| 93 | 93 | */ |
| 94 | - public OptionsArray|null $options = null; |
|
| 94 | + public OptionsArray | null $options = null; |
|
| 95 | 95 | |
| 96 | 96 | public function build(): string |
| 97 | 97 | { |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | return trim( |
| 105 | 105 | 'PARTITION ' . $this->name |
| 106 | 106 | . (empty($this->type) ? '' : ' VALUES ' . $this->type . ' ' . $this->expr . ' ') |
| 107 | - . (! empty($this->options) && ! empty($this->type) ? '' : ' ') |
|
| 107 | + . (!empty($this->options) && !empty($this->type) ? '' : ' ') |
|
| 108 | 108 | . $this->options . $subpartitions, |
| 109 | 109 | ); |
| 110 | 110 | } |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | /** |
| 19 | 19 | * The referenced table. |
| 20 | 20 | */ |
| 21 | - public Expression|null $table = null; |
|
| 21 | + public Expression | null $table = null; |
|
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * The referenced columns. |
@@ -30,14 +30,14 @@ discard block |
||
| 30 | 30 | /** |
| 31 | 31 | * The options of the referencing. |
| 32 | 32 | */ |
| 33 | - public OptionsArray|null $options = null; |
|
| 33 | + public OptionsArray | null $options = null; |
|
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | * @param Expression|null $table the name of the table referenced |
| 37 | 37 | * @param string[] $columns the columns referenced |
| 38 | 38 | * @param OptionsArray|null $options the options |
| 39 | 39 | */ |
| 40 | - public function __construct(Expression|null $table = null, array $columns = [], OptionsArray|null $options = null) |
|
| 40 | + public function __construct(Expression | null $table = null, array $columns = [], OptionsArray | null $options = null) |
|
| 41 | 41 | { |
| 42 | 42 | $this->table = $table; |
| 43 | 43 | $this->columns = $columns; |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | /** |
| 19 | 19 | * The value to be compared. |
| 20 | 20 | */ |
| 21 | - public Expression|null $value = null; |
|
| 21 | + public Expression | null $value = null; |
|
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * The conditions in WHEN clauses. |
@@ -44,12 +44,12 @@ discard block |
||
| 44 | 44 | /** |
| 45 | 45 | * The result in ELSE section of expr. |
| 46 | 46 | */ |
| 47 | - public Expression|null $elseResult = null; |
|
| 47 | + public Expression | null $elseResult = null; |
|
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | 50 | * The alias of this CASE statement. |
| 51 | 51 | */ |
| 52 | - public string|null $alias = null; |
|
| 52 | + public string | null $alias = null; |
|
| 53 | 53 | |
| 54 | 54 | /** |
| 55 | 55 | * The sub-expression. |
@@ -14,15 +14,15 @@ |
||
| 14 | 14 | final class GroupKeyword implements Component |
| 15 | 15 | { |
| 16 | 16 | /** @var 'ASC'|'DESC'|null */ |
| 17 | - public string|null $type = null; |
|
| 17 | + public string | null $type = null; |
|
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * The expression that is used for grouping. |
| 21 | 21 | */ |
| 22 | - public Expression|null $expr = null; |
|
| 22 | + public Expression | null $expr = null; |
|
| 23 | 23 | |
| 24 | 24 | /** @param Expression|null $expr the expression that we are sorting by */ |
| 25 | - public function __construct(Expression|null $expr = null) |
|
| 25 | + public function __construct(Expression | null $expr = null) |
|
| 26 | 26 | { |
| 27 | 27 | $this->expr = $expr; |
| 28 | 28 | } |
@@ -14,18 +14,18 @@ |
||
| 14 | 14 | /** |
| 15 | 15 | * The number of rows skipped. |
| 16 | 16 | */ |
| 17 | - public int|string $offset; |
|
| 17 | + public int | string $offset; |
|
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * The number of rows to be returned. |
| 21 | 21 | */ |
| 22 | - public int|string $rowCount; |
|
| 22 | + public int | string $rowCount; |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * @param int|string $rowCount the row count |
| 26 | 26 | * @param int|string $offset the offset |
| 27 | 27 | */ |
| 28 | - public function __construct(int|string $rowCount = 0, int|string $offset = 0) |
|
| 28 | + public function __construct(int | string $rowCount = 0, int | string $offset = 0) |
|
| 29 | 29 | { |
| 30 | 30 | $this->rowCount = $rowCount; |
| 31 | 31 | $this->offset = $offset; |
@@ -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 | |