@@ -58,7 +58,7 @@ |
||
58 | 58 | /** |
59 | 59 | * Execute the console command. |
60 | 60 | * |
61 | - * @return mixed |
|
61 | + * @return boolean |
|
62 | 62 | */ |
63 | 63 | public function handle() |
64 | 64 | { |
@@ -45,11 +45,11 @@ |
||
45 | 45 | */ |
46 | 46 | public function getHelp() |
47 | 47 | { |
48 | - $help = $this->description . ' Available steps:' . PHP_EOL; |
|
48 | + $help = $this->description.' Available steps:'.PHP_EOL; |
|
49 | 49 | |
50 | 50 | foreach ($this->steps as $alias => $class) |
51 | 51 | { |
52 | - $help .= ' - <comment>' . $alias . '</comment>' . PHP_EOL; |
|
52 | + $help .= ' - <comment>'.$alias.'</comment>'.PHP_EOL; |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | return $help; |
@@ -111,8 +111,7 @@ |
||
111 | 111 | { |
112 | 112 | return $step->run($pretend); |
113 | 113 | } |
114 | - } |
|
115 | - catch (\Exception $e) |
|
114 | + } catch (\Exception $e) |
|
116 | 115 | { |
117 | 116 | $this->error($e->getMessage()); |
118 | 117 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | } |
26 | 26 | |
27 | 27 | $app->detectEnvironment( |
28 | - function () |
|
28 | + function() |
|
29 | 29 | { |
30 | 30 | return env('APP_ENV', 'production'); |
31 | 31 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public function prompt() |
28 | 28 | { |
29 | - return 'Do you want to ' . (file_exists(base_path('.env')) ? 'update' : 'create') . ' .env file?'; |
|
29 | + return 'Do you want to '.(file_exists(base_path('.env')) ? 'update' : 'create').' .env file?'; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | /** |
@@ -54,11 +54,11 @@ discard block |
||
54 | 54 | foreach (\Lanin\Laravel\SetupWizard\Support\DotEnv::$variables as $name => $default) |
55 | 55 | { |
56 | 56 | $options = config( |
57 | - 'setup.dot_env.variables.' . $name, |
|
57 | + 'setup.dot_env.variables.'.$name, |
|
58 | 58 | ['type' => self::INPUT, 'prompt' => 'Provide value for environment variable'] |
59 | 59 | ); |
60 | 60 | |
61 | - $result[$name] = $this->{'run' . $options['type']}($name, $options, $default); |
|
61 | + $result[$name] = $this->{'run'.$options['type']}($name, $options, $default); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | return $result; |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | */ |
153 | 153 | protected function generatePrompt($name, $prompt) |
154 | 154 | { |
155 | - return $prompt . ' <comment>' . $name . '=?</comment>'; |
|
155 | + return $prompt.' <comment>'.$name.'=?</comment>'; |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | /** |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | $file = fopen(base_path('.env'), 'w+'); |
204 | 204 | foreach ($results as $variable => $value) |
205 | 205 | { |
206 | - fwrite($file, $variable . '=' . $value . PHP_EOL); |
|
206 | + fwrite($file, $variable.'='.$value.PHP_EOL); |
|
207 | 207 | } |
208 | 208 | |
209 | 209 | return fclose($file); |
@@ -46,8 +46,7 @@ |
||
46 | 46 | { |
47 | 47 | $return = $this->repeat(); |
48 | 48 | } |
49 | - } |
|
50 | - else |
|
49 | + } else |
|
51 | 50 | { |
52 | 51 | $return = $this->repeat(); |
53 | 52 | } |
@@ -43,7 +43,7 @@ |
||
43 | 43 | { |
44 | 44 | list($keys, $values) = array_divide($results); |
45 | 45 | |
46 | - $this->command->info('I will insert this values into <comment>' . $this->getTable() . '</comment> table'); |
|
46 | + $this->command->info('I will insert this values into <comment>'.$this->getTable().'</comment> table'); |
|
47 | 47 | $this->command->table(['column', 'value'], collect($keys)->zip(collect($values))->toArray()); |
48 | 48 | } |
49 | 49 |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | public function preview($results) |
143 | 143 | { |
144 | 144 | $this->command->info( |
145 | - "This command will be executed: <comment>" . $this->prepareCommand($results) . "</comment>" |
|
145 | + "This command will be executed: <comment>".$this->prepareCommand($results)."</comment>" |
|
146 | 146 | ); |
147 | 147 | } |
148 | 148 | |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $process = new Process($this->prepareCommand($results, true)); |
158 | 158 | |
159 | 159 | $process->run( |
160 | - function ($type, $output) use (&$result) |
|
160 | + function($type, $output) use (&$result) |
|
161 | 161 | { |
162 | 162 | $this->command->line($output); |
163 | 163 | } |
@@ -46,8 +46,7 @@ |
||
46 | 46 | { |
47 | 47 | $return = $this->repeat(); |
48 | 48 | } |
49 | - } |
|
50 | - else |
|
49 | + } else |
|
51 | 50 | { |
52 | 51 | $return = $this->repeat(); |
53 | 52 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | public function preview($results) |
32 | 32 | { |
33 | 33 | $this->command->info( |
34 | - 'This command will be executed: <comment>php artisan db:seed --class=' . $results . ' --force --no-interaction</comment>' |
|
34 | + 'This command will be executed: <comment>php artisan db:seed --class='.$results.' --force --no-interaction</comment>' |
|
35 | 35 | ); |
36 | 36 | } |
37 | 37 |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | { |
14 | 14 | $this->publishes( |
15 | 15 | [ |
16 | - __DIR__ . '/../config/setup.php' => config_path('setup.php'), |
|
16 | + __DIR__.'/../config/setup.php' => config_path('setup.php'), |
|
17 | 17 | ] |
18 | 18 | ); |
19 | 19 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | protected function registerConfig() |
46 | 46 | { |
47 | 47 | $this->mergeConfigFrom( |
48 | - __DIR__ . '/../config/setup.php', |
|
48 | + __DIR__.'/../config/setup.php', |
|
49 | 49 | 'setup' |
50 | 50 | ); |
51 | 51 | } |