@@ -102,8 +102,8 @@ discard block |
||
| 102 | 102 | $this->prefix = $prefix; |
| 103 | 103 | |
| 104 | 104 | //Initializing states |
| 105 | - $this->initialState = new TableState($this->prefix . $name); |
|
| 106 | - $this->currentState = new TableState($this->prefix . $name); |
|
| 105 | + $this->initialState = new TableState($this->prefix.$name); |
|
| 106 | + $this->currentState = new TableState($this->prefix.$name); |
|
| 107 | 107 | |
| 108 | 108 | $this->exists = $this->driver->hasTable($this->getName()); |
| 109 | 109 | |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | */ |
| 171 | 171 | public function setName(string $name): string |
| 172 | 172 | { |
| 173 | - $this->currentState->setName($this->prefix . $name); |
|
| 173 | + $this->currentState->setName($this->prefix.$name); |
|
| 174 | 174 | |
| 175 | 175 | return $this->getName(); |
| 176 | 176 | } |
@@ -541,7 +541,7 @@ discard block |
||
| 541 | 541 | */ |
| 542 | 542 | protected function createIdentifier(string $type, array $columns): string |
| 543 | 543 | { |
| 544 | - $name = $this->getName() . '_' . $type . '_' . join('_', $columns) . '_' . uniqid(); |
|
| 544 | + $name = $this->getName().'_'.$type.'_'.join('_', $columns).'_'.uniqid(); |
|
| 545 | 545 | |
| 546 | 546 | if (strlen($name) > 64) { |
| 547 | 547 | //Many DBMS has limitations on identifier length |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | string $column = 'id', |
| 156 | 156 | bool $forcePrefix = true |
| 157 | 157 | ): AbstractReference { |
| 158 | - $this->foreignTable = ($forcePrefix ? $this->tablePrefix : '') . $table; |
|
| 158 | + $this->foreignTable = ($forcePrefix ? $this->tablePrefix : '').$table; |
|
| 159 | 159 | $this->foreignKey = $column; |
| 160 | 160 | |
| 161 | 161 | return $this; |
@@ -203,10 +203,10 @@ discard block |
||
| 203 | 203 | $statement[] = 'CONSTRAINT'; |
| 204 | 204 | $statement[] = $driver->identifier($this->name); |
| 205 | 205 | $statement[] = 'FOREIGN KEY'; |
| 206 | - $statement[] = '(' . $driver->identifier($this->column) . ')'; |
|
| 206 | + $statement[] = '('.$driver->identifier($this->column).')'; |
|
| 207 | 207 | |
| 208 | - $statement[] = 'REFERENCES ' . $driver->identifier($this->foreignTable); |
|
| 209 | - $statement[] = '(' . $driver->identifier($this->foreignKey) . ')'; |
|
| 208 | + $statement[] = 'REFERENCES '.$driver->identifier($this->foreignTable); |
|
| 209 | + $statement[] = '('.$driver->identifier($this->foreignKey).')'; |
|
| 210 | 210 | |
| 211 | 211 | $statement[] = "ON DELETE {$this->deleteRule}"; |
| 212 | 212 | $statement[] = "ON UPDATE {$this->updateRule}"; |