Passed
Push — master ( 4bbe1f...037c6a )
by Maarten
03:24
created
src/Commands/Synchronise.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,11 +45,11 @@
 block discarded – undo
45 45
         }
46 46
 
47 47
         if ($this->option('limit')) {
48
-            $synchronizer->limit = (int) $this->option('limit');
48
+            $synchronizer->limit = (int)$this->option('limit');
49 49
         }
50 50
 
51 51
         $synchronizer->run();
52 52
 
53
-        $this->info(PHP_EOL.'Synchronization done!');
53
+        $this->info(PHP_EOL . 'Synchronization done!');
54 54
     }
55 55
 }
Please login to merge, or discard this patch.
src/DatabaseSynchronizer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function run(): void
42 42
     {
43 43
         foreach ($this->getTables() as $table) {
44
-            $this->feedback(PHP_EOL.PHP_EOL . "Table: $table", 'line');
44
+            $this->feedback(PHP_EOL . PHP_EOL . "Table: $table", 'line');
45 45
 
46 46
             $this->syncTable($table);
47 47
             $this->syncRows($table);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         foreach ($rows as $row) {
98 98
             $exists = $this->toDB->table($table)->where($queryColumn, $row->{$queryColumn})->first();
99 99
 
100
-            if (! $exists) {
100
+            if (!$exists) {
101 101
                 $this->toDB->table($table)->insert((array)$row);
102 102
             } else {
103 103
                 $this->toDB->table($table)->where($queryColumn, $row->{$queryColumn})->update((array)$row);
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     {
127 127
         $this->feedback("Creating '$this->to.$table' table", 'warn');
128 128
 
129
-        Schema::connection($this->to)->create($table, function (Blueprint $table_bp) use($table, $columns) {
129
+        Schema::connection($this->to)->create($table, function(Blueprint $table_bp) use($table, $columns) {
130 130
             foreach ($columns as $column) {
131 131
                 $type = Schema::connection($this->from)->getColumnType($table, $column);
132 132
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 
140 140
     private function updateTable(string $table, string $column): void
141 141
     {
142
-        Schema::connection($this->to)->table($table, function (Blueprint $table_bp) use ($table, $column) {
142
+        Schema::connection($this->to)->table($table, function(Blueprint $table_bp) use ($table, $column) {
143 143
             $type = Schema::connection($this->from)->getColumnType($table, $column);
144 144
 
145 145
             $table_bp->{$type}($column)->nullable();
Please login to merge, or discard this patch.