Passed
Push — master ( 66dd56...e66595 )
by Ferry
03:49
created
src/commands/MigrateData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     public function handle()
33 33
     {
34 34
         $this->info("== Data Migrate ==");
35
-        $this->call("db:seed",["--class"=>"CbMigrationSeeder"]);
35
+        $this->call("db:seed", ["--class"=>"CbMigrationSeeder"]);
36 36
         $this->info("== Data Migrate Finished ==");
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
src/commands/MigrationData.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,18 +41,18 @@  discard block
 block discarded – undo
41 41
         $php_string = "";
42 42
         $additional_tables = cbConfig("ADDITIONAL_DATA_MIGRATION");
43 43
 
44
-        foreach($tables as $table) {
45
-            if(substr($table,0,3) == "cb_" || in_array($table, $additional_tables)) {
44
+        foreach ($tables as $table) {
45
+            if (substr($table, 0, 3) == "cb_" || in_array($table, $additional_tables)) {
46 46
                 $this->info("Create seeder for table : ".$table);
47 47
                 $rows = DB::table($table)->get();
48 48
                 $data = [];
49
-                foreach($rows as $i=>$row) {
49
+                foreach ($rows as $i=>$row) {
50 50
                     $data[$i] = [];
51
-                    foreach($row as $key=>$val) {
51
+                    foreach ($row as $key=>$val) {
52 52
                         $data[$i][$key] = $val;
53 53
                     }
54 54
                 }
55
-                if(count($data)!=0) {
55
+                if (count($data) != 0) {
56 56
                     $php_string .= 'DB::table(\''.$table.'\')->delete();'."\n\t\t\t";
57 57
                     $php_string .= 'DB::table(\''.$table.'\')->insert('.min_var_export($data).');'."\n\t\t\t";
58 58
                 }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $composer_path = '';
83 83
         if (file_exists(getcwd().'/composer.phar')) {
84 84
             $composer_path = '"'.PHP_BINARY.'" '.getcwd().'/composer.phar';
85
-        }else{
85
+        } else {
86 86
             $composer_path = 'composer';
87 87
         }
88 88
 
Please login to merge, or discard this patch.