Passed
Pull Request — 4.x (#25)
by
unknown
65:04
created
src/KitLoong/MigrationsGenerator/MigrationsGeneratorServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
         $this->app->singleton(
35 35
             self::COMMAND,
36
-            function (Container $app) {
36
+            function(Container $app) {
37 37
                 return new MigrateGenerateCommand(
38 38
                     $app->make(Generator::class),
39 39
                     $app->make(SchemaGenerator::class),
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         $this->commands(self::COMMAND);
47 47
 
48 48
         // Bind the Repository Interface to $app['migrations.repository']
49
-        $this->app->bind('Illuminate\Database\Migrations\MigrationRepositoryInterface', function ($app) {
49
+        $this->app->bind('Illuminate\Database\Migrations\MigrationRepositoryInterface', function($app) {
50 50
             return $app['migration.repository'];
51 51
         });
52 52
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
         $this->app->singleton(Compiler::class, TemplateCompiler::class);
58 58
 
59
-        $this->app->singleton(MigrationsGeneratorSetting::class, function () {
59
+        $this->app->singleton(MigrationsGeneratorSetting::class, function() {
60 60
             return new MigrationsGeneratorSetting();
61 61
         });
62 62
     }
Please login to merge, or discard this patch.
src/Xethron/MigrationsGenerator/Syntax/AddForeignKeysToTable.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,15 +16,15 @@
 block discarded – undo
16 16
     {
17 17
         // Check for multiple columns
18 18
         if (count($foreignKey['fields']) > 1) {
19
-            $value = "['" . implode("', '", $foreignKey['fields']) . "']";
20
-            $references = "['" . implode("', '", $foreignKey['references']) . "']";
19
+            $value = "['".implode("', '", $foreignKey['fields'])."']";
20
+            $references = "['".implode("', '", $foreignKey['references'])."']";
21 21
         } else {
22
-            $value = "'" . $foreignKey['fields'][0] . "'";
23
-            $references = "'" . $foreignKey['references'][0] . "'";
22
+            $value = "'".$foreignKey['fields'][0]."'";
23
+            $references = "'".$foreignKey['references'][0]."'";
24 24
         }
25 25
 
26 26
         if (!empty($foreignKey['name'])) {
27
-            $value .= ", '" . $foreignKey['name'] . "'";
27
+            $value .= ", '".$foreignKey['name']."'";
28 28
         }
29 29
 
30 30
         $output = sprintf(
Please login to merge, or discard this patch.
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.