Test Failed
Push — dev5 ( 6a960f...113ec3 )
by Ron
16:42
created
app/Console/Commands/updateRun.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,8 @@  discard block
 block discarded – undo
22 22
         $this->line('');
23 23
         //  Select which update file to use
24 24
         $updateFile = $this->checkForUpdate();
25
-        if ($updateFile) {
25
+        if ($updateFile)
26
+        {
26 27
             //  Open up the file and verify it is at least the same version as the current setup
27 28
             $valid = $this->openUpdate($updateFile);
28 29
 
@@ -80,7 +81,8 @@  discard block
 block discarded – undo
80 81
             $this->line('');
81 82
 
82 83
             $anticipate = [];
83
-            foreach ($updateList as $key => $up) {
84
+            foreach ($updateList as $key => $up)
85
+            {
84 86
                 $opt = $key + 1;
85 87
                 $anticipate[$opt] = $up;
86 88
                 $this->line('[' . $opt . '] ' . $up);
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/AdminController.php 1 patch
Braces   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,8 +36,7 @@  discard block
 block discarded – undo
36 36
         $userLinks = new UserCollection(
37 37
                         User::withCount([
38 38
                                 'FileLinks',
39
-                                'FileLinks as expired_file_links_count' => function($query)
40
-                                {
39
+                                'FileLinks as expired_file_links_count' => function($query) {
41 40
                                     $query->where('expire', '<', Carbon::now());
42 41
                                 }
43 42
                             ])
@@ -91,7 +90,8 @@  discard block
 block discarded – undo
91 90
         Log::notice('User '.Auth::user()->full_name.' updated User Password Policy');
92 91
 
93 92
         //  If the setting is changing from never to xx days, update all users
94
-        if ($request->passExpire == 0) {
93
+        if ($request->passExpire == 0)
94
+        {
95 95
             User::whereNotNull('password_expires')->update([
96 96
                 'password_expires' => null
97 97
             ]);
@@ -112,8 +112,7 @@  discard block
 block discarded – undo
112 112
     {
113 113
         $this->authorize('hasAccess', 'Manage User Roles');
114 114
         Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
115
-        $roles = UserRoleType::with(['UserRolePermissions' => function($query)
116
-        {
115
+        $roles = UserRoleType::with(['UserRolePermissions' => function($query) {
117 116
             $query->join('user_role_permission_types', 'user_role_permission_types.perm_type_id', '=', 'user_role_permissions.perm_type_id');
118 117
         }])->get();
119 118
         $perms = UserRolePermissionTypes::all();
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/UserController.php 1 patch
Braces   +16 added lines, -7 removed lines patch added patch discarded remove patch
@@ -182,12 +182,18 @@  discard block
 block discarded – undo
182 182
 
183 183
         //  Good to go - get role information
184 184
         $roleArr = [];
185
-        foreach ($roles as $role) {
186
-            if ($role->role_id == 1 && Auth::user()->role_id != 1) {
185
+        foreach ($roles as $role)
186
+        {
187
+            if ($role->role_id == 1 && Auth::user()->role_id != 1)
188
+            {
187 189
                 continue;
188
-            } else if ($role->role_id == 2 && Auth::user()->role_id > 1) {
190
+            }
191
+            else if ($role->role_id == 2 && Auth::user()->role_id > 1)
192
+            {
189 193
                 continue;
190
-            } else {
194
+            }
195
+            else
196
+            {
191 197
                 // $roleArr[$role->role_id] = $role->name;
192 198
                 $roleArr[] = [
193 199
                     'value' => $role->role_id,
@@ -279,17 +285,20 @@  discard block
 block discarded – undo
279 285
         $user = User::find($request->user_id);
280 286
 
281 287
         //  Verify this is a valid user ID
282
-        if (!$user) {
288
+        if (!$user)
289
+        {
283 290
             $success = false;
284 291
             $reason  = 'Cannot find user with this ID';
285 292
         }
286 293
         //  Make sure that the user is not trying to deactivate someone with more permissions
287
-        else if ($user->role_id < Auth::user()->role_id) {
294
+        else if ($user->role_id < Auth::user()->role_id)
295
+        {
288 296
             $success = false;
289 297
             $reason  = 'You cannot change password for a user with higher permissions that you.  If this user has locked themselves out, have then use the reset link on the login page.';
290 298
         }
291 299
         //  Good to go - update user password
292
-        else {
300
+        else
301
+        {
293 302
             //  Update the user data
294 303
             $user->update(
295 304
             [
Please login to merge, or discard this patch.