Passed
Pull Request — 4.x (#25)
by
unknown
65:04
created
src/KitLoong/MigrationsGenerator/MigrateGenerateCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -157,14 +157,14 @@  discard block
 block discarded – undo
157 157
         foreach ($this->single_creates as $table => $file) {
158 158
             $code = file_get_contents("database/migrations/${file}.php");
159 159
             list($up, $down) = $this->getUpDown($code);
160
-            $creates[$table] = [ 'up' => $up, 'down' => $down, ];
160
+            $creates[$table] = ['up' => $up, 'down' => $down, ];
161 161
             unlink("database/migrations/${file}.php");
162 162
         }
163 163
 
164 164
         foreach ($this->single_keys as $table => $file) {
165 165
             $code = file_get_contents("database/migrations/${file}.php");
166 166
             list($up, $down) = $this->getUpDown($code);
167
-            $keys[$table] = [ 'up' => $up, 'down' => $down, ];
167
+            $keys[$table] = ['up' => $up, 'down' => $down, ];
168 168
             unlink("database/migrations/${file}.php");
169 169
         }
170 170
 
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             }
218 218
         }
219 219
 
220
-        $file = $pre . $ups . $mid . $downs . $end;
220
+        $file = $pre.$ups.$mid.$downs.$end;
221 221
         $filename = "database/migrations/{$this->datePrefix}_create_initial_tables_and_keys.php";
222 222
         file_put_contents($filename, $file);
223 223
 
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
     {
234 234
         preg_match('/public function up\(\)\n\s+{((?:[^}]*(?:}[^}]+)*)}\);)\n\s+}\n\n/m', $code, $upMatches);
235 235
         preg_match('/public function down\(\)\n\s+{((?:[^}]*(?:}[^}]+)*))}\n}/m', $code, $downMatches);
236
-        return [ $upMatches[1], $downMatches[1] ];
236
+        return [$upMatches[1], $downMatches[1]];
237 237
     }
238 238
 
239 239
     protected function setup(string $connection): void
Please login to merge, or discard this patch.