Completed
Push — master ( d2c2c6...fb774e )
by Maxim
08:26
created
src/Commands/Setup.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this 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
     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;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,8 +111,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Support/Bootstrap/DetectEnvironment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         }
26 26
 
27 27
         $app->detectEnvironment(
28
-            function ()
28
+            function()
29 29
             {
30 30
                 return env('APP_ENV', 'production');
31 31
             }
Please login to merge, or discard this patch.
src/Commands/Steps/DotEnv.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,7 @@
 block discarded – undo
46 46
             {
47 47
                 $return = $this->repeat();
48 48
             }
49
-        }
50
-        else
49
+        } else
51 50
         {
52 51
             $return = $this->repeat();
53 52
         }
Please login to merge, or discard this patch.
src/Commands/Steps/CreateUser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Commands/Steps/CreateDatabase.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
src/Commands/Steps/AbstractStep.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,7 @@
 block discarded – undo
46 46
             {
47 47
                 $return = $this->repeat();
48 48
             }
49
-        }
50
-        else
49
+        } else
51 50
         {
52 51
             $return = $this->repeat();
53 52
         }
Please login to merge, or discard this patch.
src/Commands/Steps/Seed.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/SetupWizardServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
config/setup.php 1 patch
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-use Lanin\Laravel\SetupWizard\Commands\Steps\DotEnv;
4 3
 use Lanin\Laravel\SetupWizard\Commands\Steps\CreateDatabase;
5
-use Lanin\Laravel\SetupWizard\Commands\Steps\Migrate;
6
-use Lanin\Laravel\SetupWizard\Commands\Steps\Seed;
7 4
 use Lanin\Laravel\SetupWizard\Commands\Steps\CreateUser;
5
+use Lanin\Laravel\SetupWizard\Commands\Steps\DotEnv;
6
+use Lanin\Laravel\SetupWizard\Commands\Steps\Migrate;
8 7
 use Lanin\Laravel\SetupWizard\Commands\Steps\Optimize;
8
+use Lanin\Laravel\SetupWizard\Commands\Steps\Seed;
9 9
 
10 10
 return [
11 11
     // Setup title. Shown in the beginning of setup.
Please login to merge, or discard this patch.