Completed
Push — master ( 1a8299...ee62de )
by Guillaume
01:53
created
src/Structure/MysqlDatabaseTable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Structure/MysqlDatabaseColumn.php 1 patch
Spacing   +3 added lines, -3 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;
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Factory/JsonDatabaseFactory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             if (isset($dataTable['collate'])) {
60 60
                 $table->setCollate($dataTable['collate']);
61 61
             }
62
-            foreach ((array)$dataTable['columns'] as $columnName => $row) {
62
+            foreach ((array) $dataTable['columns'] as $columnName => $row) {
63 63
                 $column = new MysqlDatabaseColumn($columnName, $row['type'], $row['length'], $row['nullable'], $row['defaultValue'], $row['extra']);
64 64
                 if (isset($row['collate'])) {
65 65
                     $column->setCollate($row['collate']);
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
                 $table->addColumn($column);
68 68
 
69 69
             }
70
-            foreach ((array)$dataTable['indexes'] as $row) {
70
+            foreach ((array) $dataTable['indexes'] as $row) {
71 71
                 $table->addIndex($row['columns'], $row['name']);
72 72
             }
73 73
             if (isset($dataTable['primary'])) {
74
-                $table->addPrimary((array)$dataTable['primary']);
74
+                $table->addPrimary((array) $dataTable['primary']);
75 75
             }
76
-            foreach ((array)$dataTable['uniques'] as $row) {
76
+            foreach ((array) $dataTable['uniques'] as $row) {
77 77
                 $table->addUnique($row['columns'], $row['name']);
78 78
             }
79 79
             $tables[] = $table;
@@ -133,11 +133,11 @@  discard block
 block discarded – undo
133 133
         $export = [];
134 134
         foreach ($data as $nomTable => $table) {
135 135
             $dataTable = $resolverTable->resolve($table);
136
-            foreach ((array)$dataTable['columns'] as $columnName => $column) {
136
+            foreach ((array) $dataTable['columns'] as $columnName => $column) {
137 137
                 $dataTable['columns'][$columnName] = $resolverColumns->resolve($column);
138 138
             }
139 139
             foreach (['indexes', 'uniques'] as $indexKey) {
140
-                foreach ((array)$dataTable[$indexKey] as $keyIndex => $index) {
140
+                foreach ((array) $dataTable[$indexKey] as $keyIndex => $index) {
141 141
                     $dataTable[$indexKey][$keyIndex] = $resolverIndex->resolve($index);
142 142
                 }
143 143
             }
Please login to merge, or discard this patch.
src/Checker/MysqlDatabaseCheckerService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         if (!$this->checkCollate) {
212 212
             $column->setCollate('');
213 213
             $newColumn->setCollate('');
214
-            if($column == $newColumn){
214
+            if ($column == $newColumn) {
215 215
                 return true;
216 216
             }
217 217
         }
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
     {
243 243
         $statements = [];
244 244
         foreach ($modificationsBetweenTable as $modifications) {
245
-            foreach ((array)$modifications as $modification) {
245
+            foreach ((array) $modifications as $modification) {
246 246
                 $statements[] = $modification;
247 247
             }
248 248
         }
Please login to merge, or discard this patch.