Completed
Push — master ( d278b5...81f2b1 )
by Guillaume
02:18
created
src/Repository/MysqlRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
      */
54 54
     public function getTablesCollation($database, $table)
55 55
     {
56
-        $sql =' SELECT c.collation_name
56
+        $sql = ' SELECT c.collation_name
57 57
                 FROM information_schema.`TABLES` t
58 58
                 INNER JOIN information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` c ON c.collation_name = t.table_collation
59 59
                 WHERE 
Please login to merge, or discard this patch.
src/Structure/MysqlDatabaseColumn.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
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;
@@ -115,10 +115,10 @@  discard block
 block discarded – undo
115 115
         }
116 116
         $null = $this->getNullable() ? '' : 'NOT';
117 117
         $default = $this->getDefaultValue() == false ? '' : ' DEFAULT ' . $this->getDefaultValue();
118
-        $collate = $this->getCollate()==''?'':sprintf("COLLATE '%s'", $this->getCollate());
118
+        $collate = $this->getCollate() == '' ? '' : sprintf("COLLATE '%s'", $this->getCollate());
119 119
         $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);
120 120
 
121
-        return [str_replace(['   ', '  ',], ' ', $modification)];
121
+        return [str_replace(['   ', '  ', ], ' ', $modification)];
122 122
     }
123 123
 
124 124
     /**
@@ -189,9 +189,9 @@  discard block
 block discarded – undo
189 189
         $null = $this->getNullable() ? '' : 'NOT';
190 190
         $default = $this->getDefaultValue() == false ? '' : ' DEFAULT ' . $this->getDefaultValue();
191 191
         $columnName = '`' . $this->getName() . '`';
192
-        $collate = $this->getCollate()==''?'':sprintf("COLLATE '%s'", $this->getCollate());
192
+        $collate = $this->getCollate() == '' ? '' : sprintf("COLLATE '%s'", $this->getCollate());
193 193
         $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);
194 194
 
195
-        return [str_replace(['   ', '  ',], ' ', $modification)];
195
+        return [str_replace(['   ', '  ', ], ' ', $modification)];
196 196
     }
197 197
 }
Please login to merge, or discard this patch.
src/Structure/MysqlDatabaseTable.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
         }
174 174
         foreach ($columns as $column) {
175 175
             try {
176
-                if($this->getCollate() == ''){
176
+                if ($this->getCollate() == '') {
177 177
                     $column->setCollate('');
178 178
                 }
179 179
                 $modifications[] = $column->createStatement();
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
     {
208 208
         $statements = [];
209 209
         foreach ($modificationsBetweenTable as $modifications) {
210
-            foreach ((array)$modifications as $modification) {
210
+            foreach ((array) $modifications as $modification) {
211 211
                 $statements[] = $modification;
212 212
             }
213 213
         }
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
         }
223 223
         $tmp = [];
224 224
         foreach ($modifications as $modification) {
225
-            $tmp[] = trim(str_replace(['ALTER TABLE `' . $this->getTable() . '` ADD COLUMN', 'ALTER TABLE `' . $this->getTable() . '` ADD ', ';',], '', $modification));
225
+            $tmp[] = trim(str_replace(['ALTER TABLE `' . $this->getTable() . '` ADD COLUMN', 'ALTER TABLE `' . $this->getTable() . '` ADD ', ';', ], '', $modification));
226 226
         }
227 227
         $collate = $this->getCollate() == '' ? '' : sprintf("COLLATE='%s'", $this->getCollate());
228 228
 
Please login to merge, or discard this patch.