Completed
Push — develop ( 2471d3...076d45 )
by Greg
01:52
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/UpdateAccounts.php 1 patch
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\Console\Command;
6 6
 use App\Account;
7
-use Storage;
8 7
 
9 8
 class UpdateAccounts extends Command
10 9
 {
Please login to merge, or discard this patch.
app/Http/Controllers/AccountController.php 1 patch
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -3,9 +3,6 @@
 block discarded – undo
3 3
 namespace App\Http\Controllers;
4 4
 
5 5
 use Illuminate\Http\Request;
6
-use Illuminate\Routing\UrlGenerator as Url;
7
-
8
-use App\Http\Requests;
9 6
 use App\Account;
10 7
 use App\Group;
11 8
 use App\Category;
Please login to merge, or discard this patch.
app/Http/Controllers/AdminController.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,6 @@
 block discarded – undo
3 3
 namespace App\Http\Controllers;
4 4
 
5 5
 use Illuminate\Http\Request;
6
-
7
-use App\Http\Requests;
8 6
 use App\User;
9 7
 use App\Group;
10 8
 use Auth;
Please login to merge, or discard this patch.
app/Http/Controllers/CategoryController.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,6 @@
 block discarded – undo
3 3
 namespace App\Http\Controllers;
4 4
 
5 5
 use Illuminate\Http\Request;
6
-
7
-use App\Http\Requests;
8 6
 use App\Category;
9 7
 
10 8
 class CategoryController extends Controller
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
     {
97 97
         $category = Category::findOrFail($id);
98 98
         $accounts = $category->accounts()->where('status', 0);
99
-        if (count($accounts) > 0 ) {
99
+        if (count($accounts) > 0) {
100 100
             $accounts->delete();
101 101
         }
102 102
         return redirect()->back()->with(
Please login to merge, or discard this patch.
app/Http/Controllers/GroupController.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,6 @@
 block discarded – undo
3 3
 namespace App\Http\Controllers;
4 4
 
5 5
 use Illuminate\Http\Request;
6
-
7
-use App\Http\Requests;
8 6
 use App\Group;
9 7
 
10 8
 class GroupController extends Controller
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
     {
101 101
         $group = Group::findOrFail($id);
102 102
         $accounts = Group::Find($id)->accounts()->where('status', 0);
103
-        if (count($accounts) > 0 ) {
103
+        if (count($accounts) > 0) {
104 104
             $accounts->delete();
105 105
         }
106 106
         return redirect()->back()->with(
Please login to merge, or discard this patch.
app/Http/Controllers/HomeController.php 2 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -2,9 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Http\Controllers;
4 4
 
5
-use App\Http\Requests;
6
-use Illuminate\Http\Request;
7
-
8 5
 use App\Account;
9 6
 use App\Group;
10 7
 use App\ProxyListItem;
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
 
43 43
     private function accountSummary()
44 44
     {
45
-        $list = [ 'total' => 0, 'summary' => []];
45
+        $list = ['total' => 0, 'summary' => []];
46 46
         $categories = Category::orderBy('name', 'asc')->get();
47 47
         foreach ($categories as $category) {
48 48
             $count = Account::where('category_id', $category->id)->count();
49 49
             if ($count) {
50
-                $list['summary'][]= [
50
+                $list['summary'][] = [
51 51
                     'count' => $count,
52 52
                     'text' => $category->name
53 53
                 ];
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
 
60 60
     private function groupSummary()
61 61
     {
62
-        $list = [ 'total' => 0, 'summary' => []];
62
+        $list = ['total' => 0, 'summary' => []];
63 63
         $groups = Group::orderBy('name', 'asc')->get();
64 64
         foreach ($groups as $group) {
65 65
             $count = Account::where('group_id', $group->id)->count();
66
-            $list['summary'][]= [
66
+            $list['summary'][] = [
67 67
                 'count' => $count,
68 68
                 'text' => $group->name
69 69
             ];
@@ -74,11 +74,11 @@  discard block
 block discarded – undo
74 74
 
75 75
     private function categorySummary()
76 76
     {
77
-        $list = [ 'total' => 0, 'summary' => []];
77
+        $list = ['total' => 0, 'summary' => []];
78 78
         $categories = Category::get();
79 79
         foreach ($categories as $category) {
80 80
             $count = Account::where('category_id', $category->id)->count();
81
-            $list['summary'][]= [
81
+            $list['summary'][] = [
82 82
                 'count' => $count,
83 83
                 'text' => $category->name
84 84
             ];
@@ -89,12 +89,12 @@  discard block
 block discarded – undo
89 89
 
90 90
     private function listSummary()
91 91
     {
92
-        $list = [ 'total' => 0, 'summary' => [] ];
93
-        $types = [ 'domain', 'url' ];
92
+        $list = ['total' => 0, 'summary' => []];
93
+        $types = ['domain', 'url'];
94 94
         foreach ($types as $type) {
95 95
             $count = ProxyListItem::where('type', $type)->count();
96 96
             if ($count) {
97
-                $list['summary'][]= [
97
+                $list['summary'][] = [
98 98
                     'count' => $count,
99 99
                     'text' => "{$type}s"
100 100
                 ];
@@ -106,11 +106,11 @@  discard block
 block discarded – undo
106 106
 
107 107
     private function userSummary()
108 108
     {
109
-        $list = [ 'total' => 0, 'summary' => []];
109
+        $list = ['total' => 0, 'summary' => []];
110 110
         foreach (User::USER_LEVEL as $id => $level) {
111 111
             $count = User::where('level', $id)->count();
112 112
             if ($count) {
113
-                $list['summary'][]= [
113
+                $list['summary'][] = [
114 114
                     'count' => $count,
115 115
                     'text' => $level['text']
116 116
                 ];
Please login to merge, or discard this patch.
app/Http/Controllers/InstallerController.php 2 patches
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.
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.
app/Http/Controllers/ProxyListItemController.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,6 @@
 block discarded – undo
3 3
 namespace App\Http\Controllers;
4 4
 
5 5
 use Illuminate\Http\Request;
6
-
7
-use App\Http\Requests;
8 6
 use App\ProxyListItem;
9 7
 
10 8
 class ProxyListItemController extends Controller
Please login to merge, or discard this patch.