@@ -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 | } |
@@ -28,14 +28,14 @@ |
||
28 | 28 | * @var array |
29 | 29 | **/ |
30 | 30 | protected $selects = [ |
31 | - 'column_name as Field', |
|
32 | - 'column_type as Type', |
|
33 | - 'is_nullable as null', |
|
34 | - 'column_key as Key', |
|
35 | - 'column_default as Default', |
|
36 | - 'extra as Extra', |
|
37 | - 'data_type as Data_Type', |
|
38 | - ]; |
|
31 | + 'column_name as Field', |
|
32 | + 'column_type as Type', |
|
33 | + 'is_nullable as null', |
|
34 | + 'column_key as Key', |
|
35 | + 'column_default as Default', |
|
36 | + 'extra as Extra', |
|
37 | + 'data_type as Data_Type', |
|
38 | + ]; |
|
39 | 39 | /** |
40 | 40 | * Select fields from constraints. |
41 | 41 | * |
@@ -32,6 +32,9 @@ discard block |
||
32 | 32 | |
33 | 33 | //end getDatabaseName() |
34 | 34 | |
35 | + /** |
|
36 | + * @param string $title |
|
37 | + */ |
|
35 | 38 | protected function blockMessage($title, $message, $style = 'info') |
36 | 39 | { |
37 | 40 | // Symfony style block messages |
@@ -46,6 +49,9 @@ discard block |
||
46 | 49 | |
47 | 50 | //end blockMessage() |
48 | 51 | |
52 | + /** |
|
53 | + * @param string $message |
|
54 | + */ |
|
49 | 55 | protected function sectionMessage($title, $message) |
50 | 56 | { |
51 | 57 | $formatter = $this->getHelperSet()->get('formatter'); |
@@ -86,6 +92,9 @@ discard block |
||
86 | 92 | |
87 | 93 | //end getOptions() |
88 | 94 | |
95 | + /** |
|
96 | + * @param string $action |
|
97 | + */ |
|
89 | 98 | protected function fireAction($action, $database) |
90 | 99 | { |
91 | 100 | // Grab the options |
@@ -38,7 +38,7 @@ |
||
38 | 38 | $this->fireAction('migrate', $database); |
39 | 39 | |
40 | 40 | // Symfony style block messages |
41 | - $this->blockMessage('Success!', 'Database migrations generated in: '.$this->handler->getMigrationsFilePath()); |
|
41 | + $this->blockMessage('Success!', 'Database migrations generated in: ' . $this->handler->getMigrationsFilePath()); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | //end fire() |
@@ -53,9 +53,9 @@ |
||
53 | 53 | |
54 | 54 | private function getFilename() |
55 | 55 | { |
56 | - $filename = ucfirst(Str::camel($this->database)).'DatabaseSeeder'; |
|
56 | + $filename = ucfirst(Str::camel($this->database)) . 'DatabaseSeeder'; |
|
57 | 57 | |
58 | - return Config::get('db-exporter.export_path.seeds')."/{$filename}.php"; |
|
58 | + return Config::get('db-exporter.export_path.seeds') . "/{$filename}.php"; |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | //end getFilename() |