@@ -748,7 +748,7 @@ |
||
| 748 | 748 | } |
| 749 | 749 | |
| 750 | 750 | if (!empty($enumValues)) { |
| 751 | - return '(' . implode(', ', $enumValues) . ')'; |
|
| 751 | + return '('.implode(', ', $enumValues).')'; |
|
| 752 | 752 | } |
| 753 | 753 | |
| 754 | 754 | return ''; |
@@ -164,7 +164,7 @@ |
||
| 164 | 164 | */ |
| 165 | 165 | public function setName($name) |
| 166 | 166 | { |
| 167 | - parent::setName($this->prefix . $name); |
|
| 167 | + parent::setName($this->prefix.$name); |
|
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | /** |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | */ |
| 167 | 167 | public function references(string $table, string $column = 'id'): AbstractReference |
| 168 | 168 | { |
| 169 | - $this->foreignTable = $this->table->getPrefix() . $table; |
|
| 169 | + $this->foreignTable = $this->table->getPrefix().$table; |
|
| 170 | 170 | $this->foreignKey = $column; |
| 171 | 171 | |
| 172 | 172 | return $this; |
@@ -212,10 +212,10 @@ discard block |
||
| 212 | 212 | $statement[] = 'CONSTRAINT'; |
| 213 | 213 | $statement[] = $this->getName(true); |
| 214 | 214 | $statement[] = 'FOREIGN KEY'; |
| 215 | - $statement[] = '(' . $this->table->getDriver()->identifier($this->column) . ')'; |
|
| 215 | + $statement[] = '('.$this->table->getDriver()->identifier($this->column).')'; |
|
| 216 | 216 | |
| 217 | - $statement[] = 'REFERENCES ' . $this->table->getDriver()->identifier($this->foreignTable); |
|
| 218 | - $statement[] = '(' . $this->table->getDriver()->identifier($this->foreignKey) . ')'; |
|
| 217 | + $statement[] = 'REFERENCES '.$this->table->getDriver()->identifier($this->foreignTable); |
|
| 218 | + $statement[] = '('.$this->table->getDriver()->identifier($this->foreignKey).')'; |
|
| 219 | 219 | |
| 220 | 220 | $statement[] = "ON DELETE {$this->deleteRule}"; |
| 221 | 221 | $statement[] = "ON UPDATE {$this->updateRule}"; |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | */ |
| 246 | 246 | protected function generateName(): string |
| 247 | 247 | { |
| 248 | - $name = $this->table->getName() . '_foreign_' . $this->column . '_' . uniqid(); |
|
| 248 | + $name = $this->table->getName().'_foreign_'.$this->column.'_'.uniqid(); |
|
| 249 | 249 | |
| 250 | 250 | if (strlen($name) > 64) { |
| 251 | 251 | //Many dbs has limitations on identifier length |
@@ -23,10 +23,10 @@ |
||
| 23 | 23 | $statement = []; |
| 24 | 24 | |
| 25 | 25 | $statement[] = 'FOREIGN KEY'; |
| 26 | - $statement[] = '(' . $this->table->getDriver()->identifier($this->column) . ')'; |
|
| 26 | + $statement[] = '('.$this->table->getDriver()->identifier($this->column).')'; |
|
| 27 | 27 | |
| 28 | - $statement[] = 'REFERENCES ' . $this->table->getDriver()->identifier($this->foreignTable); |
|
| 29 | - $statement[] = '(' . $this->table->getDriver()->identifier($this->foreignKey) . ')'; |
|
| 28 | + $statement[] = 'REFERENCES '.$this->table->getDriver()->identifier($this->foreignTable); |
|
| 29 | + $statement[] = '('.$this->table->getDriver()->identifier($this->foreignKey).')'; |
|
| 30 | 30 | |
| 31 | 31 | $statement[] = "ON DELETE {$this->deleteRule}"; |
| 32 | 32 | $statement[] = "ON UPDATE {$this->updateRule}"; |