Completed
Push — master ( 81f2b1...625aec )
by Guillaume
01:48
created
src/Checker/MysqlDatabaseCheckerService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@
 block discarded – undo
188 188
     {
189 189
         $statements = [];
190 190
         foreach ($modificationsBetweenTable as $modifications) {
191
-            foreach ((array)$modifications as $modification) {
191
+            foreach ((array) $modifications as $modification) {
192 192
                 $statements[] = $modification;
193 193
             }
194 194
         }
Please login to merge, or discard this patch.
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.
src/Factory/JsonDatabaseFactory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             if (isset($row['collate'])) {
55 55
                 $table->setCollate($dataTable['collate']);
56 56
             }
57
-            foreach ((array)$dataTable['columns'] as $columnName => $row) {
57
+            foreach ((array) $dataTable['columns'] as $columnName => $row) {
58 58
                 $column = new MysqlDatabaseColumn($columnName, $row['type'], $row['length'], $row['nullable'], $row['defaultValue'], $row['extra']);
59 59
                 if (isset($row['collate'])) {
60 60
                     $column->setCollate($row['collate']);
@@ -62,13 +62,13 @@  discard block
 block discarded – undo
62 62
                 $table->addColumn($column);
63 63
 
64 64
             }
65
-            foreach ((array)$dataTable['indexes'] as $row) {
65
+            foreach ((array) $dataTable['indexes'] as $row) {
66 66
                 $table->addIndex($row['columns'], $row['name']);
67 67
             }
68 68
             if (isset($dataTable['primary'])) {
69
-                $table->addPrimary((array)$dataTable['primary']);
69
+                $table->addPrimary((array) $dataTable['primary']);
70 70
             }
71
-            foreach ((array)$dataTable['uniques'] as $row) {
71
+            foreach ((array) $dataTable['uniques'] as $row) {
72 72
                 $table->addUnique($row['columns'], $row['name']);
73 73
             }
74 74
             $tables[] = $table;
@@ -128,11 +128,11 @@  discard block
 block discarded – undo
128 128
         $export = [];
129 129
         foreach ($data as $nomTable => $table) {
130 130
             $dataTable = $resolverTable->resolve($table);
131
-            foreach ((array)$dataTable['columns'] as $columnName => $column) {
131
+            foreach ((array) $dataTable['columns'] as $columnName => $column) {
132 132
                 $dataTable['columns'][$columnName] = $resolverColumns->resolve($column);
133 133
             }
134 134
             foreach (['indexes', 'uniques'] as $indexKey) {
135
-                foreach ((array)$dataTable[$indexKey] as $keyIndex => $index) {
135
+                foreach ((array) $dataTable[$indexKey] as $keyIndex => $index) {
136 136
                     $dataTable[$indexKey][$keyIndex] = $resolverIndex->resolve($index);
137 137
                 }
138 138
             }
Please login to merge, or discard this patch.