Passed
Branch master (81f0af)
by Guillaume
05:09
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/Factory/JsonDatabaseFactory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -57,16 +57,16 @@  discard block
 block discarded – undo
57 57
             } catch (\Exception $e) {
58 58
                 continue;
59 59
             }
60
-            foreach ((array)$dataTable['columns'] as $columnName => $row) {
60
+            foreach ((array) $dataTable['columns'] as $columnName => $row) {
61 61
                 $table->addColumn(new MysqlDatabaseColumn($columnName, $row['type'], $row['length'], $row['nullable'], $row['defaultValue'], $row['extra']));
62 62
             }
63
-            foreach ((array)$dataTable['indexes'] as $row) {
63
+            foreach ((array) $dataTable['indexes'] as $row) {
64 64
                 $table->addIndex($row['columns'], $row['name']);
65 65
             }
66 66
             if (isset($dataTable['primary'])) {
67
-                $table->addPrimary((array)$dataTable['primary']);
67
+                $table->addPrimary((array) $dataTable['primary']);
68 68
             }
69
-            foreach ((array)$dataTable['uniques'] as $row) {
69
+            foreach ((array) $dataTable['uniques'] as $row) {
70 70
                 $table->addUnique($row['columns'], $row['name']);
71 71
             }
72 72
             $tables[] = $table;
@@ -129,11 +129,11 @@  discard block
 block discarded – undo
129 129
         $export = [];
130 130
         foreach ($data as $nomTable => $table) {
131 131
             $dataTable = $resolverTable->resolve($table);
132
-            foreach ((array)$dataTable['columns'] as $columnName => $column) {
132
+            foreach ((array) $dataTable['columns'] as $columnName => $column) {
133 133
                 $dataTable['columns'][$columnName] = $resolverColumns->resolve($column);
134 134
             }
135 135
             foreach (['indexes', 'uniques'] as $indexKey) {
136
-                foreach ((array)$dataTable[$indexKey] as $keyIndex => $index) {
136
+                foreach ((array) $dataTable[$indexKey] as $keyIndex => $index) {
137 137
                     $dataTable[$indexKey][$keyIndex] = $resolverIndex->resolve($index);
138 138
                 }
139 139
             }
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
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     {
53 53
         $isEnum = explode('enum', $this->type);
54 54
         if (!empty($isEnum)) {
55
-            $numberElements = substr_count(str_replace(['(', ')', "'",], '', $isEnum[1]), ',') + 1;
55
+            $numberElements = substr_count(str_replace(['(', ')', "'", ], '', $isEnum[1]), ',') + 1;
56 56
             if ($numberElements == 2) {
57 57
                 $this->type = 'tinyint';
58 58
                 $this->length = 1;
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         $default = $this->getDefaultValue() == false ? '' : ' DEFAULT ' . $this->getDefaultValue();
96 96
         $modification = sprintf('ALTER TABLE `%s` ADD COLUMN `%s` %s %s NULL %s %s;', $this->getTable(), $this->getName(), $this->getColonneType(), $null, $default, $this->getExtra());
97 97
 
98
-        return [str_replace(['   ', '  ',], ' ', $modification)];
98
+        return [str_replace(['   ', '  ', ], ' ', $modification)];
99 99
     }
100 100
 
101 101
     /**
@@ -168,6 +168,6 @@  discard block
 block discarded – undo
168 168
         $columnName = '`' . $this->getName() . '`';
169 169
         $modification = sprintf('ALTER TABLE `%s` CHANGE COLUMN %s %s %s %s NULL %s %s;', $this->getTable(), $columnName, $columnName, $this->getColonneType(), $null, $default, $this->getExtra());
170 170
 
171
-        return [str_replace(['   ', '  ',], ' ', $modification)];
171
+        return [str_replace(['   ', '  ', ], ' ', $modification)];
172 172
     }
173 173
 }
Please login to merge, or discard this patch.
src/Structure/MysqlDatabaseTable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
     {
184 184
         $statements = [];
185 185
         foreach ($modificationsBetweenTable as $modifications) {
186
-            foreach ((array)$modifications as $modification) {
186
+            foreach ((array) $modifications as $modification) {
187 187
                 $statements[] = $modification;
188 188
             }
189 189
         }
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         }
199 199
         $tmp = [];
200 200
         foreach ($modifications as $modification) {
201
-            $tmp[] = str_replace(['ALTER TABLE `' . $this->getTable() . '` ADD COLUMN', 'ALTER TABLE `' . $this->getTable() . '` ADD ', ';',], '', $modification);
201
+            $tmp[] = str_replace(['ALTER TABLE `' . $this->getTable() . '` ADD COLUMN', 'ALTER TABLE `' . $this->getTable() . '` ADD ', ';', ], '', $modification);
202 202
         }
203 203
 
204 204
         return [$finalStatement . '(' . implode(',', $tmp) . ');'];
Please login to merge, or discard this patch.