@@ -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 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | { |
| 75 | 75 | $isEnum = explode('enum', $this->type); |
| 76 | 76 | if (!empty($isEnum)) { |
| 77 | - $numberElements = substr_count(str_replace(['(', ')', "'",], '', $isEnum[1]), ',') + 1; |
|
| 77 | + $numberElements = substr_count(str_replace(['(', ')', "'", ], '', $isEnum[1]), ',') + 1; |
|
| 78 | 78 | if ($numberElements == 2) { |
| 79 | 79 | $this->type = 'tinyint'; |
| 80 | 80 | $this->length = 1; |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | $collate = $this->getCollate() == '' ? '' : sprintf("COLLATE '%s'", $this->getCollate()); |
| 107 | 107 | $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); |
| 108 | 108 | |
| 109 | - return [str_replace([' ', ' ',], ' ', $modification)]; |
|
| 109 | + return [str_replace([' ', ' ', ], ' ', $modification)]; |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | /** |
@@ -180,6 +180,6 @@ discard block |
||
| 180 | 180 | $collate = $this->getCollate() == '' ? '' : sprintf("COLLATE '%s'", $this->getCollate()); |
| 181 | 181 | $modification = sprintf('ALTER TABLE `%s` CHANGE COLUMN %s %s %s %s NULL %s %s %s;', $this->getTable(), $columnName, $columnName, $this->getColonneType(), $null, $default, $this->getExtra(), $collate); |
| 182 | 182 | |
| 183 | - return [str_replace([' ', ' ',], ' ', $modification)]; |
|
| 183 | + return [str_replace([' ', ' ', ], ' ', $modification)]; |
|
| 184 | 184 | } |
| 185 | 185 | } |