Passed
Push — master ( 5d479d...e9a2c9 )
by Guillaume
02:57
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/Factory/MysqlDatabaseFactory.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -115,14 +115,14 @@
 block discarded – undo
115 115
     }
116 116
 
117 117
 	
118
-	public function exportStructure(){
119
-		$export = [];
118
+    public function exportStructure(){
119
+        $export = [];
120 120
         $tables = $this->repositoryMysql->getTablesStructure($this->databaseName);
121 121
         foreach ($tables as $table) {
122 122
             $export[$table] = $this->getIndex($table);
123 123
             $export[$table]['columns'] = $this->getColumns($table);
124 124
         }
125 125
 		
126
-		return json_encode($export);
127
-	}
126
+        return json_encode($export);
127
+    }
128 128
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
     }
116 116
 
117 117
 	
118
-	public function exportStructure(){
118
+	public function exportStructure() {
119 119
 		$export = [];
120 120
         $tables = $this->repositoryMysql->getTablesStructure($this->databaseName);
121 121
         foreach ($tables as $table) {
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
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     {
64 64
         $isEnum = explode('enum', $this->type);
65 65
         if (!empty($isEnum)) {
66
-            $numberElements = substr_count(str_replace(['(', ')', "'",], '', $isEnum[1]), ',') + 1;
66
+            $numberElements = substr_count(str_replace(['(', ')', "'", ], '', $isEnum[1]), ',') + 1;
67 67
             if ($numberElements == 2) {
68 68
                 $this->type = 'tinyint';
69 69
                 $this->length = 1;
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         $collate = $this->formatCollate();
93 93
         $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);
94 94
 
95
-        return [str_replace(['   ', '  ',], ' ', $modification)];
95
+        return [str_replace(['   ', '  ', ], ' ', $modification)];
96 96
     }
97 97
 
98 98
     /**
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
         $collate = $this->formatCollate();
206 206
         $modification = sprintf('ALTER TABLE `%s` CHANGE COLUMN `%s` `%s` %s %s NULL %s %s %s;', $this->getTable(), $this->getName(), $this->getName(), $this->getColonneType(), $null, $default, $this->getExtra(), $collate);
207 207
 
208
-        return [str_replace(['   ', '  ',], ' ', $modification)];
208
+        return [str_replace(['   ', '  ', ], ' ', $modification)];
209 209
     }
210 210
 
211 211
     public function deleteStatement(): string
Please login to merge, or discard this patch.