@@ -87,7 +87,7 @@ |
||
87 | 87 | */ |
88 | 88 | public function ignore(...$tables) |
89 | 89 | { |
90 | - DbExporter::$ignore = array_merge(DbExporter::$ignore, (array) $tables); |
|
90 | + DbExporter::$ignore = array_merge(DbExporter::$ignore, (array)$tables); |
|
91 | 91 | |
92 | 92 | return $this; |
93 | 93 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | { |
99 | 99 | $this->app->singleton( |
100 | 100 | 'db-exporter.migrations', |
101 | - function ($app) { |
|
101 | + function($app) { |
|
102 | 102 | return new Commands\MigrationsGeneratorCommand($app[DbExportHandler::class]); |
103 | 103 | } |
104 | 104 | ); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | { |
114 | 114 | $this->app->singleton( |
115 | 115 | 'db-exporter.seeds', |
116 | - function ($app) { |
|
116 | + function($app) { |
|
117 | 117 | return new Commands\SeedGeneratorCommand($app[DbExportHandler::class]); |
118 | 118 | } |
119 | 119 | ); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | { |
126 | 126 | $this->app->singleton( |
127 | 127 | 'db-exporter.backup', |
128 | - function () { |
|
128 | + function() { |
|
129 | 129 | return new Commands\CopyToRemoteCommand(); |
130 | 130 | } |
131 | 131 | ); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | { |
141 | 141 | $this->app->bind( |
142 | 142 | DbExportHandler::class, |
143 | - function ($app) { |
|
143 | + function($app) { |
|
144 | 144 | // Instatiate a new DbSeeding class to send to the handler |
145 | 145 | $seeder = new DbSeeding($app[DbMigrations::class]->database); |
146 | 146 | |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | |
152 | 152 | $this->app->bind( |
153 | 153 | 'DbExporter', |
154 | - function ($app) { |
|
154 | + function($app) { |
|
155 | 155 | return $app[DbExportHandler::class]; |
156 | 156 | } |
157 | 157 | ); |
@@ -33,7 +33,7 @@ |
||
33 | 33 | { |
34 | 34 | $this->app->singleton( |
35 | 35 | DbMigrations::class, |
36 | - function () { |
|
36 | + function() { |
|
37 | 37 | $connType = Config::get('database.default'); |
38 | 38 | $database = Config::get('database.connections.' . $connType); |
39 | 39 |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $this->line("\n"); |
37 | 37 | $this->info(ucfirst($type)); |
38 | 38 | foreach ($files as $file) { |
39 | - $this->sectionMessage($type, $file.' uploaded.'); |
|
39 | + $this->sectionMessage($type, $file . ' uploaded.'); |
|
40 | 40 | } |
41 | 41 | } |
42 | 42 | |
@@ -80,19 +80,18 @@ discard block |
||
80 | 80 | |
81 | 81 | protected function upload($what) |
82 | 82 | { |
83 | - $localPath = Config::get('db-exporter.export_path.'.$what); |
|
83 | + $localPath = Config::get('db-exporter.export_path.' . $what); |
|
84 | 84 | $dir = scandir($localPath); |
85 | - $remotePath = Config::get('db-exporter.remote.'.$what); |
|
85 | + $remotePath = Config::get('db-exporter.remote.' . $what); |
|
86 | 86 | $this->line("\n"); |
87 | 87 | $this->info(ucfirst($what)); |
88 | 88 | // Reset file coounter |
89 | 89 | static::$filesCount = 0; |
90 | 90 | // Prepare the progress bar |
91 | - array_walk($dir, function ($file) { |
|
91 | + array_walk($dir, function($file) { |
|
92 | 92 | if ($this->ignoredFile($file)) { |
93 | 93 | return; |
94 | - } |
|
95 | - ++static::$filesCount; |
|
94 | + }++static::$filesCount; |
|
96 | 95 | }); |
97 | 96 | $progress = $this->output->createProgressBar(static::$filesCount); |
98 | 97 | foreach ($dir as $file) { |
@@ -102,12 +101,12 @@ discard block |
||
102 | 101 | } |
103 | 102 | |
104 | 103 | // Capture the uploaded files for displaying later |
105 | - $this->uploadedFiles[$what][] = $remotePath.$file; |
|
104 | + $this->uploadedFiles[$what][] = $remotePath . $file; |
|
106 | 105 | |
107 | 106 | // Copy the files |
108 | 107 | Storage::disk($this->getDiskName())->put( |
109 | - $remotePath.$file, |
|
110 | - $localPath.'/'.$file |
|
108 | + $remotePath . $file, |
|
109 | + $localPath . '/' . $file |
|
111 | 110 | ); |
112 | 111 | $progress->advance(); |
113 | 112 | } |