@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | { |
195 | 195 | $statements = []; |
196 | 196 | foreach ($modificationsBetweenTable as $modifications) { |
197 | - foreach ((array)$modifications as $modification) { |
|
197 | + foreach ((array) $modifications as $modification) { |
|
198 | 198 | $statements[] = $modification; |
199 | 199 | } |
200 | 200 | } |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | } |
210 | 210 | $tmp = []; |
211 | 211 | foreach ($modifications as $modification) { |
212 | - $tmp[] = trim(str_replace(['ALTER TABLE `' . $this->getTable() . '` ADD COLUMN', 'ALTER TABLE `' . $this->getTable() . '` ADD ', ';',], '', $modification)); |
|
212 | + $tmp[] = trim(str_replace(['ALTER TABLE `' . $this->getTable() . '` ADD COLUMN', 'ALTER TABLE `' . $this->getTable() . '` ADD ', ';', ], '', $modification)); |
|
213 | 213 | } |
214 | 214 | $collate = $this->getCollate() == '' ? '' : sprintf("COLLATE='%s'", $this->getCollate()); |
215 | 215 |
@@ -115,14 +115,14 @@ |
||
115 | 115 | } |
116 | 116 | |
117 | 117 | |
118 | - public function exportStructure(){ |
|
119 | - $export = []; |
|
118 | + public function exportStructure(){ |
|
119 | + $export = []; |
|
120 | 120 | $tables = $this->repositoryMysql->getTablesStructure($this->databaseName); |
121 | 121 | foreach ($tables as $table) { |
122 | 122 | $export[$table] = $this->getIndex($table); |
123 | 123 | $export[$table]['columns'] = $this->getColumns($table); |
124 | 124 | } |
125 | 125 | |
126 | - return json_encode($export); |
|
127 | - } |
|
126 | + return json_encode($export); |
|
127 | + } |
|
128 | 128 | } |
@@ -115,7 +115,7 @@ |
||
115 | 115 | } |
116 | 116 | |
117 | 117 | |
118 | - public function exportStructure(){ |
|
118 | + public function exportStructure() { |
|
119 | 119 | $export = []; |
120 | 120 | $tables = $this->repositoryMysql->getTablesStructure($this->databaseName); |
121 | 121 | foreach ($tables as $table) { |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | { |
64 | 64 | $isEnum = explode('enum', $this->type); |
65 | 65 | if (!empty($isEnum)) { |
66 | - $numberElements = substr_count(str_replace(['(', ')', "'",], '', $isEnum[1]), ',') + 1; |
|
66 | + $numberElements = substr_count(str_replace(['(', ')', "'", ], '', $isEnum[1]), ',') + 1; |
|
67 | 67 | if ($numberElements == 2) { |
68 | 68 | $this->type = 'tinyint'; |
69 | 69 | $this->length = 1; |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $collate = $this->formatCollate(); |
93 | 93 | $modification = sprintf('ALTER TABLE `%s` ADD COLUMN `%s` %s %s NULL %s %s %s;', $this->getTable(), $this->getName(), $this->getColonneType(), $null, $default, $this->getExtra(), $collate); |
94 | 94 | |
95 | - return [str_replace([' ', ' ',], ' ', $modification)]; |
|
95 | + return [str_replace([' ', ' ', ], ' ', $modification)]; |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | $collate = $this->formatCollate(); |
206 | 206 | $modification = sprintf('ALTER TABLE `%s` CHANGE COLUMN `%s` `%s` %s %s NULL %s %s %s;', $this->getTable(), $this->getName(), $this->getName(), $this->getColonneType(), $null, $default, $this->getExtra(), $collate); |
207 | 207 | |
208 | - return [str_replace([' ', ' ',], ' ', $modification)]; |
|
208 | + return [str_replace([' ', ' ', ], ' ', $modification)]; |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | public function deleteStatement(): string |