Completed
Push — develop ( ce7aaf...adea53 )
by Greg
16s
created
app/Account.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Illuminate\Database\Eloquent\Model;
6 6
 use App\User;
7
-
8 7
 use WhiteHat101\Crypt\APR1_MD5;
9 8
 
10 9
 class Account extends Model
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@
 block discarded – undo
13 13
     const ACCOUNT_ENABLE = 1;
14 14
 
15 15
     const ACCOUNT_STATUS = [
16
-        0 => [  'text' => 'accounts.disabled',
16
+        0 => ['text' => 'accounts.disabled',
17 17
                 'icon' => 'fa-ban',
18
-                'unicon' => '' ],
19
-        1 => [  'text' => 'accounts.enabled',
18
+                'unicon' => ''],
19
+        1 => ['text' => 'accounts.enabled',
20 20
                 'icon' => 'fa-globe',
21
-                'unicon' => '' ]
21
+                'unicon' => '']
22 22
     ];
23 23
 
24 24
     const SEARCH_CRITERIA = [
Please login to merge, or discard this patch.
app/Console/Commands/ExportWhitelists.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -50,6 +50,9 @@
 block discarded – undo
50 50
         }
51 51
     }
52 52
 
53
+    /**
54
+     * @param boolean $isWhiteList
55
+     */
53 56
     private function exportProxyList($type, $isWhiteList)
54 57
     {
55 58
         $items = ProxyListItem::where('type', $type)
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,19 +66,19 @@
 block discarded – undo
66 66
 
67 67
         $flagCI = $this->option('ci');
68 68
         if ($flagCI === false) {
69
-          $bar = $this->output->createProgressBar($count);
69
+            $bar = $this->output->createProgressBar($count);
70 70
         }
71 71
 
72 72
         foreach ($items as $item) {
73 73
             $this->storage->prepend($filename, "{$item->value}");
74 74
             if (isset($bar)) {
75
-              $bar->advance();
75
+                $bar->advance();
76 76
             }
77 77
         }
78 78
 
79 79
         if (isset($bar)) {
80
-          $bar->finish();
81
-          $this->info("\n");
80
+            $bar->finish();
81
+            $this->info("\n");
82 82
         }
83 83
 
84 84
         try {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     public function handle()
40 40
     {
41 41
         $whitelist = empty($this->option('blacklist'));
42
-        if ( false === empty($this->option('list'))) {
42
+        if (false === empty($this->option('list'))) {
43 43
             $this->exportProxyList($this->option('list'), $whitelist);
44 44
         } else {
45 45
             $this->exportProxyList('domain', $whitelist);
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
         try {
85 85
             $url = $this->exportToLocation($filename);
86
-        } catch(\Exception $e) {
86
+        } catch (\Exception $e) {
87 87
             $this->error('Export cancelled by user!');
88 88
             return;
89 89
         }
Please login to merge, or discard this patch.
app/Http/Controllers/AccountController.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     /**
109 109
      * Add a new account.
110 110
      *
111
-     * @return Response
111
+     * @return \Illuminate\Http\RedirectResponse
112 112
      */
113 113
     public function addAccount(Request $request)
114 114
     {
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      *
150 150
      * @param  Request  $request
151 151
      * @param  int  $id
152
-     * @return Response
152
+     * @return \Illuminate\Http\RedirectResponse
153 153
      */
154 154
     public function updateAccount(Request $request, $id)
155 155
     {
Please login to merge, or discard this patch.
app/Http/Controllers/AdminController.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     /**
77 77
      * Add a new user.
78 78
      *
79
-     * @return Response
79
+     * @return \Illuminate\Http\RedirectResponse
80 80
      */
81 81
     public function addUser(Request $request)
82 82
     {
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      *
115 115
      * @param  Request  $request
116 116
      * @param  int  $id
117
-     * @return Response
117
+     * @return \Illuminate\Http\RedirectResponse
118 118
      */
119 119
     public function updateUser(Request $request, $id = 0)
120 120
     {
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
      * Enable an user.
170 170
      *
171 171
      * @param  int  $id
172
-     * @return Response
172
+     * @return \Illuminate\Http\RedirectResponse
173 173
      */
174 174
     public function enableUser($id)
175 175
     {
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
      * Disable an user.
187 187
      *
188 188
      * @param  int  $id
189
-     * @return Response
189
+     * @return \Illuminate\Http\RedirectResponse
190 190
      */
191 191
     public function disableUser($id)
192 192
     {
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
      * Remove an user.
204 204
      *
205 205
      * @param  int  $id
206
-     * @return Response
206
+     * @return \Illuminate\Http\RedirectResponse
207 207
      */
208 208
     public function removeUser($id)
209 209
     {
Please login to merge, or discard this patch.
app/Http/Controllers/InstallerController.php 5 patches
Doc Comments   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     /**
49 49
      * XXXXXXXXXX
50 50
      *
51
-     * @return \Illuminate\View\View
51
+     * @return \Illuminate\Http\RedirectResponse
52 52
      */
53 53
     public function stepStoreApp(Request $request, Redirector $redirect)
54 54
     {
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     /**
76 76
      * XXXXXXXXXX
77 77
      *
78
-     * @return \Illuminate\View\View
78
+     * @return \Illuminate\Http\RedirectResponse
79 79
      */
80 80
     public function stepStoreDb(Request $request, Redirector $redirect)
81 81
     {
@@ -161,7 +161,6 @@  discard block
 block discarded – undo
161 161
     /**
162 162
      * Processes the newly saved environment configuration and continue.
163 163
      *
164
-     * @param Request $input
165 164
      * @param Redirector $redirect
166 165
      * @return \Illuminate\Http\RedirectResponse
167 166
      */
@@ -205,7 +204,7 @@  discard block
 block discarded – undo
205 204
     /**
206 205
      * XXXXXXXXXX
207 206
      *
208
-     * @return \Illuminate\View\View
207
+     * @return \Illuminate\Http\RedirectResponse
209 208
      */
210 209
     public function stepMigrate(DatabaseManager $databaseManager)
211 210
     {
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,6 @@
 block discarded – undo
5 5
 use Validator;
6 6
 use Illuminate\Http\Request;
7 7
 use Illuminate\Routing\Redirector;
8
-use Illuminate\Support\Facades\Artisan;
9
-use App\Http\Requests;
10 8
 use App\Http\Helpers\Installer\DatabaseManager;
11 9
 use App\Http\Helpers\Installer\EnvironmentManager;
12 10
 use App\Http\Helpers\Installer\PermissionsChecker;
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@
 block discarded – undo
212 212
         $response = $databaseManager->migrateAndSeed();
213 213
 
214 214
         return redirect()->route('KleisInstaller::stepFinal')
215
-                         ->with(['message' => $response]);
215
+                            ->with(['message' => $response]);
216 216
     }
217 217
 
218 218
     /**
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -130,12 +130,12 @@  discard block
 block discarded – undo
130 130
             }
131 131
         }
132 132
 
133
-        if(!empty($request->announce)) {
133
+        if (!empty($request->announce)) {
134 134
             $filename = 'announce.md';
135 135
             $mdfile = public_path("markdown/{$filename}");
136 136
             try {
137 137
                 file_put_contents($mdfile, $request->announce);
138
-            }  catch(Exception $e) {
138
+            } catch (Exception $e) {
139 139
                 return $redirect->route('KleisInstaller::stepCustomization')
140 140
                                 ->withInput();
141 141
             }
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
     {
170 170
         $status = $environmentManager->saveFile($request);
171 171
 
172
-        if($status) {
172
+        if ($status) {
173 173
             return $redirect->route('KleisInstaller::stepRequirements')
174 174
                             ->with(['message' => session('message')]);
175 175
         } else {
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@
 block discarded – undo
135 135
             $mdfile = public_path("markdown/{$filename}");
136 136
             try {
137 137
                 file_put_contents($mdfile, $request->announce);
138
-            }  catch(Exception $e) {
138
+            } catch(Exception $e) {
139 139
                 return $redirect->route('KleisInstaller::stepCustomization')
140 140
                                 ->withInput();
141 141
             }
Please login to merge, or discard this patch.
app/Http/Helpers/Installer/PermissionsChecker.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
      *
76 76
      * @param $folder
77 77
      * @param $permission
78
-     * @param $isSet
78
+     * @param boolean $isSet
79 79
      */
80 80
     private function addFileAndSetErrors($folder, $permission, $isSet)
81 81
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@
 block discarded – undo
29 29
      */
30 30
     public function check(array $folders)
31 31
     {
32
-        foreach($folders as $folder => $permission)
32
+        foreach ($folders as $folder => $permission)
33 33
         {
34
-            if(!($this->getPermission($folder) >= $permission))
34
+            if (!($this->getPermission($folder) >= $permission))
35 35
             {
36 36
                 $this->addFileAndSetErrors($folder, $permission, false);
37 37
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@
 block discarded – undo
34 34
             if(!($this->getPermission($folder) >= $permission))
35 35
             {
36 36
                 $this->addFileAndSetErrors($folder, $permission, false);
37
-            }
38
-            else {
37
+            } else {
39 38
                 $this->addFile($folder, $permission, true);
40 39
             }
41 40
         }
Please login to merge, or discard this patch.
app/Http/Middleware/RedirectIfInstalled.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      */
16 16
     public function handle($request, Closure $next)
17 17
     {
18
-        if($this->alreadyInstalled() || !config('kleis.installer')) {
18
+        if ($this->alreadyInstalled() || !config('kleis.installer')) {
19 19
             return redirect('/');
20 20
         }
21 21
 
Please login to merge, or discard this patch.
app/Http/Helpers/Installer/EnvironmentManager.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
         $data = $request->session()->all();
37 37
 
38 38
         $env = '';
39
-        foreach($data as $key => $value) {
40
-            if(preg_match('/^[A-Z]+_[A-Z]+$/', $key)) {
41
-                $env .= "${key}=${value}" . PHP_EOL;
39
+        foreach ($data as $key => $value) {
40
+            if (preg_match('/^[A-Z]+_[A-Z]+$/', $key)) {
41
+                $env .= "${key}=${value}".PHP_EOL;
42 42
             }
43 43
         }
44 44
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
         try {
60 60
             file_put_contents($this->envPath, $request->get('envConfig'));
61
-        } catch(Exception $e) {
61
+        } catch (Exception $e) {
62 62
             $status = false;
63 63
         }
64 64
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -29,6 +29,7 @@
 block discarded – undo
29 29
     /**
30 30
      * Get the content of the .env file.
31 31
      *
32
+     * @param Request $request
32 33
      * @return string
33 34
      */
34 35
     public function getEnvContent($request)
Please login to merge, or discard this patch.
app/Http/Helpers/Installer/RequirementsChecker.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@
 block discarded – undo
15 15
     {
16 16
         $results = [];
17 17
 
18
-        foreach($requirements as $requirement)
18
+        foreach ($requirements as $requirement)
19 19
         {
20 20
             $results['requirements'][$requirement] = true;
21 21
 
22
-            if(!extension_loaded($requirement))
22
+            if (!extension_loaded($requirement))
23 23
             {
24 24
                 $results['requirements'][$requirement] = false;
25 25
 
Please login to merge, or discard this patch.