@@ -50,6 +50,9 @@  | 
                                                    ||
| 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) | 
                                                        
@@ -108,7 +108,7 @@ discard block  | 
                                                    ||
| 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  | 
                                                    ||
| 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 |      { | 
                                                        
@@ -76,7 +76,7 @@ discard block  | 
                                                    ||
| 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  | 
                                                    ||
| 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  | 
                                                    ||
| 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  | 
                                                    ||
| 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  | 
                                                    ||
| 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 |      { | 
                                                        
@@ -48,7 +48,7 @@ discard block  | 
                                                    ||
| 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  | 
                                                    ||
| 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  | 
                                                    ||
| 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  | 
                                                    ||
| 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 |      { | 
                                                        
@@ -212,7 +212,7 @@  | 
                                                    ||
| 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 | /**  | 
                                                        
@@ -29,6 +29,7 @@ discard block  | 
                                                    ||
| 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)  | 
                                                        
@@ -48,7 +49,6 @@ discard block  | 
                                                    ||
| 48 | 49 | /**  | 
                                                        
| 49 | 50 | * Save the edited content to the file.  | 
                                                        
| 50 | 51 | *  | 
                                                        
| 51 | - * @param Request $input  | 
                                                        |
| 52 | 52 | * @return boolean  | 
                                                        
| 53 | 53 | */  | 
                                                        
| 54 | 54 | public function saveFile(Request $request)  | 
                                                        
@@ -75,7 +75,7 @@  | 
                                                    ||
| 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 |      { | 
                                                        
@@ -40,31 +40,31 @@  | 
                                                    ||
| 40 | 40 | *  | 
                                                        
| 41 | 41 | * @return mixed  | 
                                                        
| 42 | 42 | */  | 
                                                        
| 43 | - public function handle()  | 
                                                        |
| 44 | -     { | 
                                                        |
| 45 | - $categories = Category::get();  | 
                                                        |
| 43 | + public function handle()  | 
                                                        |
| 44 | +        { | 
                                                        |
| 45 | + $categories = Category::get();  | 
                                                        |
| 46 | 46 | |
| 47 | -         if ($categories->isEmpty()) { | 
                                                        |
| 48 | -             $this->info("No categories to export"); | 
                                                        |
| 49 | - return;  | 
                                                        |
| 50 | - }  | 
                                                        |
| 47 | +            if ($categories->isEmpty()) { | 
                                                        |
| 48 | +                $this->info("No categories to export"); | 
                                                        |
| 49 | + return;  | 
                                                        |
| 50 | + }  | 
                                                        |
| 51 | 51 | |
| 52 | -         foreach ($categories as $category){ | 
                                                        |
| 53 | - $name = static::stringNormalise($category->name);  | 
                                                        |
| 54 | - $filename = 'export/categories/' . $name . '.txt';  | 
                                                        |
| 55 | -             $accounts = Account::where('status', 1) | 
                                                        |
| 52 | +            foreach ($categories as $category){ | 
                                                        |
| 53 | + $name = static::stringNormalise($category->name);  | 
                                                        |
| 54 | + $filename = 'export/categories/' . $name . '.txt';  | 
                                                        |
| 55 | +                $accounts = Account::where('status', 1) | 
                                                        |
| 56 | 56 |                              ->where('category_id', $category->id) | 
                                                        
| 57 | 57 |                              ->orderBy('netlogin', 'desc') | 
                                                        
| 58 | 58 | ->get();  | 
                                                        
| 59 | - Storage::put($filename, '');  | 
                                                        |
| 60 | - $count = count($accounts);  | 
                                                        |
| 61 | - $bar = $this->output->createProgressBar($count);  | 
                                                        |
| 62 | -             foreach ($accounts as $account) { | 
                                                        |
| 63 | -                 Storage::prepend($filename, "{$account->netlogin}:{$account->netpass}"); | 
                                                        |
| 64 | - $bar->advance();  | 
                                                        |
| 65 | - }  | 
                                                        |
| 66 | - $bar->finish();  | 
                                                        |
| 67 | -             $this->info("\n{$count} accounts '{$category->name}' exported into file 'storage/app/{$filename}'"); | 
                                                        |
| 68 | - }  | 
                                                        |
| 69 | - }  | 
                                                        |
| 59 | + Storage::put($filename, '');  | 
                                                        |
| 60 | + $count = count($accounts);  | 
                                                        |
| 61 | + $bar = $this->output->createProgressBar($count);  | 
                                                        |
| 62 | +                foreach ($accounts as $account) { | 
                                                        |
| 63 | +                    Storage::prepend($filename, "{$account->netlogin}:{$account->netpass}"); | 
                                                        |
| 64 | + $bar->advance();  | 
                                                        |
| 65 | + }  | 
                                                        |
| 66 | + $bar->finish();  | 
                                                        |
| 67 | +                $this->info("\n{$count} accounts '{$category->name}' exported into file 'storage/app/{$filename}'"); | 
                                                        |
| 68 | + }  | 
                                                        |
| 69 | + }  | 
                                                        |
| 70 | 70 | }  | 
                                                        
@@ -40,31 +40,31 @@  | 
                                                    ||
| 40 | 40 | *  | 
                                                        
| 41 | 41 | * @return mixed  | 
                                                        
| 42 | 42 | */  | 
                                                        
| 43 | - public function handle()  | 
                                                        |
| 44 | -     { | 
                                                        |
| 45 | - $groups = Group::get();  | 
                                                        |
| 43 | + public function handle()  | 
                                                        |
| 44 | +        { | 
                                                        |
| 45 | + $groups = Group::get();  | 
                                                        |
| 46 | 46 | |
| 47 | -         if ($groups->isEmpty()) { | 
                                                        |
| 48 | -             $this->info("No groups to export"); | 
                                                        |
| 49 | - return;  | 
                                                        |
| 50 | - }  | 
                                                        |
| 47 | +            if ($groups->isEmpty()) { | 
                                                        |
| 48 | +                $this->info("No groups to export"); | 
                                                        |
| 49 | + return;  | 
                                                        |
| 50 | + }  | 
                                                        |
| 51 | 51 | |
| 52 | -         foreach ($groups as $group){ | 
                                                        |
| 53 | - $name = static::stringNormalise($group->name);  | 
                                                        |
| 54 | - $filename = 'export/groups/' . $name . '.txt';  | 
                                                        |
| 55 | -             $accounts = Account::where('status', 1) | 
                                                        |
| 52 | +            foreach ($groups as $group){ | 
                                                        |
| 53 | + $name = static::stringNormalise($group->name);  | 
                                                        |
| 54 | + $filename = 'export/groups/' . $name . '.txt';  | 
                                                        |
| 55 | +                $accounts = Account::where('status', 1) | 
                                                        |
| 56 | 56 |                              ->where('group_id', $group->id) | 
                                                        
| 57 | 57 |                              ->orderBy('netlogin', 'desc') | 
                                                        
| 58 | 58 | ->get();  | 
                                                        
| 59 | - Storage::put($filename, '');  | 
                                                        |
| 60 | - $count = count($accounts);  | 
                                                        |
| 61 | - $bar = $this->output->createProgressBar($count);  | 
                                                        |
| 62 | -             foreach ($accounts as $account) { | 
                                                        |
| 63 | -                 Storage::prepend($filename, "{$account->netlogin}:{$account->netpass}"); | 
                                                        |
| 64 | - $bar->advance();  | 
                                                        |
| 65 | - }  | 
                                                        |
| 66 | - $bar->finish();  | 
                                                        |
| 67 | -             $this->info("\n{$count} accounts '{$group->name}' exported into file 'storage/app/{$filename}'"); | 
                                                        |
| 68 | - }  | 
                                                        |
| 69 | - }  | 
                                                        |
| 59 | + Storage::put($filename, '');  | 
                                                        |
| 60 | + $count = count($accounts);  | 
                                                        |
| 61 | + $bar = $this->output->createProgressBar($count);  | 
                                                        |
| 62 | +                foreach ($accounts as $account) { | 
                                                        |
| 63 | +                    Storage::prepend($filename, "{$account->netlogin}:{$account->netpass}"); | 
                                                        |
| 64 | + $bar->advance();  | 
                                                        |
| 65 | + }  | 
                                                        |
| 66 | + $bar->finish();  | 
                                                        |
| 67 | +                $this->info("\n{$count} accounts '{$group->name}' exported into file 'storage/app/{$filename}'"); | 
                                                        |
| 68 | + }  | 
                                                        |
| 69 | + }  | 
                                                        |
| 70 | 70 | }  | 
                                                        
@@ -72,8 +72,8 @@  | 
                                                    ||
| 72 | 72 | }  | 
                                                        
| 73 | 73 | |
| 74 | 74 | /**  | 
                                                        
| 75 | - * check database type. If SQLite, then create the database file.  | 
                                                        |
| 76 | - */  | 
                                                        |
| 75 | + * check database type. If SQLite, then create the database file.  | 
                                                        |
| 76 | + */  | 
                                                        |
| 77 | 77 | private function sqlite()  | 
                                                        
| 78 | 78 |      { | 
                                                        
| 79 | 79 |          if(DB::connection() instanceof SQLiteConnection) { |