Passed
Push — master ( ac9f24...836696 )
by Ron
01:56
created
app/Http/Controllers/TechTipsController.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
             $tipData = TechTips::where('subject', 'like', '%'.$request->tipSearch.'%')
58 58
                 ->whereHas('TechTipSystems', function($q) use($request)
59 59
                 {
60
-                   $q->where('sys_id', $request->system);
60
+                    $q->where('sys_id', $request->system);
61 61
                 })
62 62
                 ->get();
63 63
         }
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@  discard block
 block discarded – undo
60 60
                    $q->where('sys_id', $request->system);
61 61
                 })
62 62
                 ->get();
63
-        }
64
-        else
63
+        } else
65 64
         {
66 65
             $tipData = TechTips::where('subject', 'like', '%'.$request->tipSearch.'%')
67 66
                 ->get();
@@ -118,8 +117,7 @@  discard block
 block discarded – undo
118 117
                     'sys_id' => $tag
119 118
                 ]);
120 119
             }
121
-        }
122
-        else
120
+        } else
123 121
         {
124 122
             TechTipSystems::create([
125 123
                 'tip_id' => $tipID,
@@ -158,8 +156,7 @@  discard block
 block discarded – undo
158 156
         try
159 157
         {
160 158
             Mail::to($userList)->send(new newTechtip($tipData));
161
-        }
162
-        catch(Exception $e)
159
+        } catch(Exception $e)
163 160
         {
164 161
             report($e);
165 162
         }
@@ -285,8 +282,7 @@  discard block
 block discarded – undo
285 282
                     'sys_id' => $tag
286 283
                 ]);
287 284
             }
288
-        }
289
-        else
285
+        } else
290 286
         {
291 287
             TechTipSystems::create([
292 288
                 'tip_id' => $id,
@@ -308,8 +304,7 @@  discard block
 block discarded – undo
308 304
                         Files::deleteFile($file->file_id);
309 305
                     }
310 306
                 }
311
-            }
312
-            else
307
+            } else
313 308
             {
314 309
                 TechTipFiles::where('tip_id', $id)->delete();
315 310
             }
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
             ->get();
37 37
 
38 38
         $sysArr = [];
39
-        foreach($systems as $sys)
39
+        foreach ($systems as $sys)
40 40
         {
41
-            foreach($sys->SystemTypes as $s)
41
+            foreach ($sys->SystemTypes as $s)
42 42
             {
43 43
                 $sysArr[$sys->name][$s->sys_id] = $s->name;
44 44
             }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     public function search(Request $request)
54 54
     {
55 55
         //  Run different request based on if system field is filled out or not
56
-        if(!empty($request->system))
56
+        if (!empty($request->system))
57 57
         {
58 58
             $tipData = TechTips::where('subject', 'like', '%'.$request->tipSearch.'%')
59 59
                 ->whereHas('TechTipSystems', function($q) use($request)
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
             ->get();
83 83
 
84 84
         $sysArr = [];
85
-        foreach($systems as $sys)
85
+        foreach ($systems as $sys)
86 86
         {
87
-            foreach($sys->SystemTypes as $s)
87
+            foreach ($sys->SystemTypes as $s)
88 88
             {
89 89
                 $sysArr[$sys->name][$s->sys_id] = $s->name;
90 90
             }
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
         $tipID = $tip->tip_id;
117 117
 
118 118
         //  Enter all system tags associated with the tip
119
-        if(is_array($request->sysTags))
119
+        if (is_array($request->sysTags))
120 120
         {
121
-            foreach($request->sysTags as $tag)
121
+            foreach ($request->sysTags as $tag)
122 122
             {
123 123
                 TechTipSystems::create([
124 124
                     'tip_id' => $tipID,
@@ -135,10 +135,10 @@  discard block
 block discarded – undo
135 135
         }
136 136
 
137 137
         //  If there are any files, process them
138
-        if(!empty($request->file))
138
+        if (!empty($request->file))
139 139
         {
140 140
             $filePath = config('filesystems.paths.tips').DIRECTORY_SEPARATOR.$tipID;
141
-            foreach($request->file as $file)
141
+            foreach ($request->file as $file)
142 142
             {
143 143
                 //  Clean the file and store it
144 144
                 $fileName = Files::cleanFilename($filePath, $file->getClientOriginalName());
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
         {
167 167
             Mail::to($userList)->send(new newTechtip($tipData));
168 168
         }
169
-        catch(Exception $e)
169
+        catch (Exception $e)
170 170
         {
171 171
             report($e);
172 172
         }
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
     public function details($id, $name)
195 195
     {
196 196
         $tipData = TechTips::where('tip_id', $id)->with('user')->first();
197
-        if(empty($tipData))
197
+        if (empty($tipData))
198 198
         {
199 199
             Log::warning('User ID-'.Auth::user()->user_id.' tried to access invlaid Tech Tip ID-'.$id.' Name-'.$name);
200 200
             return view('errors.tipNotFound');
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
     public function edit($id)
264 264
     {
265 265
         $tipData = TechTips::find($id);
266
-        if(empty($tipData))
266
+        if (empty($tipData))
267 267
         {
268 268
             return 'tip not found';
269 269
         }
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
             ->first();
282 282
         
283 283
         $tipS = [];
284
-        foreach($tipSys as $s)
284
+        foreach ($tipSys as $s)
285 285
         {
286 286
             $tipS[] = $s->sys_id;
287 287
         }
@@ -292,9 +292,9 @@  discard block
 block discarded – undo
292 292
             ->get();
293 293
 
294 294
         $sysArr = [];
295
-        foreach($systems as $sys)
295
+        foreach ($systems as $sys)
296 296
         {
297
-            foreach($sys->SystemTypes as $s)
297
+            foreach ($sys->SystemTypes as $s)
298 298
             {
299 299
                 $sysArr[$sys->name][$s->sys_id] = $s->name;
300 300
             }
@@ -330,9 +330,9 @@  discard block
 block discarded – undo
330 330
 
331 331
         //  Enter all system tags associated with the tip after destroying the existing systems
332 332
         TechTipSystems::where('tip_id', $id)->delete();
333
-        if(is_array($request->sysTags))
333
+        if (is_array($request->sysTags))
334 334
         {
335
-            foreach($request->sysTags as $tag)
335
+            foreach ($request->sysTags as $tag)
336 336
             {
337 337
                 TechTipSystems::create([
338 338
                     'tip_id' => $id,
@@ -350,13 +350,13 @@  discard block
 block discarded – undo
350 350
 
351 351
         //  Determine if any files were removed
352 352
         $tipFiles = TechTipFiles::where('tip_id', $id)->get();
353
-        if(!$tipFiles->isEmpty())
353
+        if (!$tipFiles->isEmpty())
354 354
         {
355
-            if(!empty($request->existingFile))
355
+            if (!empty($request->existingFile))
356 356
             {
357
-                foreach($tipFiles as $file)
357
+                foreach ($tipFiles as $file)
358 358
                 {
359
-                    if(!in_array($file->file_id, $request->existingFile))
359
+                    if (!in_array($file->file_id, $request->existingFile))
360 360
                     {
361 361
                         TechTipFiles::where('file_id', $file->file_id)->delete();
362 362
                         Files::deleteFile($file->file_id);
@@ -370,10 +370,10 @@  discard block
 block discarded – undo
370 370
         }
371 371
 
372 372
         //  Process any new files
373
-        if(!empty($request->file))
373
+        if (!empty($request->file))
374 374
         {
375 375
             $filePath = config('filesystems.paths.tips').DIRECTORY_SEPARATOR.$id;
376
-            foreach($request->file as $file)
376
+            foreach ($request->file as $file)
377 377
             {
378 378
                 //  Clean the file and store it
379 379
                 $fileName = Files::cleanFilename($filePath, $file->getClientOriginalName());
Please login to merge, or discard this patch.
app/Http/Controllers/UserLinksController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,4 +100,4 @@
 block discarded – undo
100 100
         return $request->all();
101 101
     }
102 102
 }
103
- 
104 103
\ No newline at end of file
104
+    
105 105
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@  discard block
 block discarded – undo
27 27
         $details = FileLinks::where('link_hash', $id)->first();
28 28
         
29 29
         //  Verify that the link is valid
30
-        if(empty($details))
30
+        if (empty($details))
31 31
         {
32 32
             return view('links.guest.badLink');
33 33
         }
34 34
         //  Verify that the link has not expired
35
-        else if($details->expire <= date('Y-m-d'))
35
+        else if ($details->expire<=date('Y-m-d'))
36 36
         {
37 37
             return view('links.guest.expiredLink');
38 38
         }
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         $details = FileLinks::where('link_hash', $hash)->first();
57 57
         
58 58
         //  Verify that the link is valid
59
-        if(empty($details))
59
+        if (empty($details))
60 60
         {
61 61
             return abort(404);
62 62
         }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $path = config('filesystems.disks.local.root').DIRECTORY_SEPARATOR;
70 70
         
71 71
         $zip = Zip::create($path.'download.zip');
72
-        foreach($files as $file)
72
+        foreach ($files as $file)
73 73
         {
74 74
             $zip->add($path.$file->file_link.$file->file_name);
75 75
         }
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         
88 88
         $filePath = config('filesystems.paths.links').DIRECTORY_SEPARATOR.$details->link_id;
89 89
 
90
-        foreach($request->file as $file)
90
+        foreach ($request->file as $file)
91 91
         {
92 92
             //  Clean the file and store it
93 93
             $fileName = Files::cleanFilename($filePath, $file->getClientOriginalName());
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                 'upload'   => 1
109 109
             ]);
110 110
             
111
-            if(!empty($request->note))
111
+            if (!empty($request->note))
112 112
             {
113 113
                 FileLinkNotes::create([
114 114
                     'link_id' => $details->link_id,
Please login to merge, or discard this patch.
app/Http/Controllers/CustomerContactsController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         $numberTypes = PhoneNumberType::all();
27 27
         
28 28
         $numTypes = [];
29
-        foreach($numberTypes as $type)
29
+        foreach ($numberTypes as $type)
30 30
         {
31 31
             $numTypes[$type->phone_type_id] = $type->description;
32 32
         }
@@ -49,12 +49,12 @@  discard block
 block discarded – undo
49 49
         
50 50
         $contID = $cont->cont_id;
51 51
         
52
-        if(!empty(array_filter($request['phoneNumber'])))
52
+        if (!empty(array_filter($request['phoneNumber'])))
53 53
         {
54 54
             $num = count($request['phoneNumber']);
55
-            for($i=0; $i < $num; $i++)
55
+            for ($i = 0; $i<$num; $i++)
56 56
             {
57
-                if(!empty($request['phoneNumber'][$i]))
57
+                if (!empty($request['phoneNumber'][$i]))
58 58
                 {
59 59
                     CustomerContactPhones::create([
60 60
                         'cont_id' => $contID,
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $numberTypes = PhoneNumberType::all();
88 88
         
89 89
         $numTypes = [];
90
-        foreach($numberTypes as $type)
90
+        foreach ($numberTypes as $type)
91 91
         {
92 92
             $numTypes[$type->phone_type_id] = $type->description;
93 93
         }
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
         
114 114
         //  Clear all contact phone numbers and re-enter them
115 115
         CustomerContactPhones::where('cont_id', $id)->delete();
116
-        if(!empty(array_filter($request['phoneNumber'])))
116
+        if (!empty(array_filter($request['phoneNumber'])))
117 117
         {
118 118
             $num = count($request['phoneNumber']);
119
-            for($i=0; $i < $num; $i++)
119
+            for ($i = 0; $i<$num; $i++)
120 120
             {
121 121
                 CustomerContactPhones::create([
122 122
                     'cont_id'       => $id,
@@ -158,9 +158,9 @@  discard block
 block discarded – undo
158 158
         $vcard->addEmail($contact->email);
159 159
         $vcard->addAddress(null, null, $custData->address, $custData->city, $custData->state, $custData->zip, null);
160 160
         
161
-        if(!empty($numbers))
161
+        if (!empty($numbers))
162 162
         {
163
-            foreach($numbers as $phone)
163
+            foreach ($numbers as $phone)
164 164
             {
165 165
                 $vcard->addPhoneNumber($phone->phone_number, $phone->description);
166 166
             }
Please login to merge, or discard this patch.
app/Exceptions/Handler.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      */
36 36
     public function report(Exception $exception)
37 37
     {
38
-        if(config('app.debug'))
38
+        if (config('app.debug'))
39 39
         {
40 40
             parent::report($exception);
41 41
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@
 block discarded – undo
38 38
         if(config('app.debug'))
39 39
         {
40 40
             parent::report($exception);
41
-        }
42
-        else
41
+        } else
43 42
         {
44 43
             Log::error('['.$exception->getCode().'] "'.$exception->getMessage().'" on line '.$exception->getTrace()[0]['line'].' of file '.$exception->getTrace()[0]['file']);
45 44
         }
Please login to merge, or discard this patch.
app/Http/Controllers/UserController.php 3 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -43,8 +43,7 @@  discard block
 block discarded – undo
43 43
             if($role->role_id == 1 && Auth::user()->role_id != 1)
44 44
             {
45 45
                 continue;
46
-            }
47
-            else
46
+            } else
48 47
             {
49 48
                 $roleArr[$role->role_id] = $role->name;
50 49
             }
@@ -94,8 +93,7 @@  discard block
 block discarded – undo
94 93
         try
95 94
         {
96 95
             Mail::to($request->email)->send(new InitializeUser($hash, $request->username, $request->first_name.' '.$request->last_name));
97
-        }
98
-        catch(Exception $e)
96
+        } catch(Exception $e)
99 97
         {
100 98
             report($e);
101 99
         }
@@ -203,8 +201,7 @@  discard block
 block discarded – undo
203 201
             if($role->role_id == 1 && Auth::user()->role_id != 1)
204 202
             {
205 203
                 continue;
206
-            }
207
-            else
204
+            } else
208 205
             {
209 206
                 $roleArr[$role->role_id] = $role->name;
210 207
             }
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         
148 148
         $nextChange = config('users.passExpires') != null ? Carbon::now()->addDays(config('users.passExpires')) : null;
149 149
         
150
-         //  Update the password
150
+            //  Update the password
151 151
         User::find($userData->user_id)->update(
152 152
         [
153 153
             'password'         => bcrypt($request->newPass),
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         
189 189
         $nextChange = isset($request->force_change) && $request->force_change == 'on' ? Carbon::now()->subDay() : null;
190 190
         
191
-         //  Update the user data
191
+            //  Update the user data
192 192
         User::find($id)->update(
193 193
         [
194 194
             'password'         => bcrypt($request->password),
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
             $linkController->destroy($link->link_id);
274 274
         }
275 275
         
276
-         //  Update the user data
276
+            //  Update the user data
277 277
         User::find($id)->update(
278 278
         [
279 279
             'active'   => 0
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
         $roles = Role::all();
42 42
         
43 43
         $roleArr = [];
44
-        foreach($roles as $role)
44
+        foreach ($roles as $role)
45 45
         {
46
-            if($role->role_id == 1 && Auth::user()->role_id != 1)
46
+            if ($role->role_id == 1 && Auth::user()->role_id != 1)
47 47
             {
48 48
                 continue;
49 49
             }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         {
97 97
             Mail::to($request->email)->send(new InitializeUser($hash, $request->username, $request->first_name.' '.$request->last_name));
98 98
         }
99
-        catch(Exception $e)
99
+        catch (Exception $e)
100 100
         {
101 101
             report($e);
102 102
         }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         //  Validate the hash token
115 115
         $user = UserInitialize::where('token', $hash)->get();
116 116
         
117
-        if($user->isEmpty())
117
+        if ($user->isEmpty())
118 118
         {
119 119
             return abort(404);
120 120
         }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     {
128 128
         //  Verify that the link matches the assigned email address
129 129
         $valid = UserInitialize::where('token', $hash)->first();
130
-        if(empty($valid))
130
+        if (empty($valid))
131 131
         {
132 132
             Log::notice('Someone tried to access an invalid User Initialization link - '.$hash);
133 133
             return abort(404);
@@ -207,9 +207,9 @@  discard block
 block discarded – undo
207 207
         $userRole = DB::select('SELECT `role_id` FROM `user_role` WHERE `user_id` = ?', [$id])[0]->role_id;
208 208
         
209 209
         $roleArr = [];
210
-        foreach($roles as $role)
210
+        foreach ($roles as $role)
211 211
         {
212
-            if($role->role_id == 1 && Auth::user()->role_id != 1)
212
+            if ($role->role_id == 1 && Auth::user()->role_id != 1)
213 213
             {
214 214
                 continue;
215 215
             }
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
         $linkController = new FileLinksController();        
266 266
         $links = FileLinks::where('user_id', $id)->get();
267 267
         
268
-        foreach($links as $link)
268
+        foreach ($links as $link)
269 269
         {
270 270
             $linkController->destroy($link->link_id);
271 271
         }
Please login to merge, or discard this patch.
app/Http/Middleware/CheckPasswordExpire.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         $user = $request->user();
22 22
         $passExp = new Carbon(($user->password_expires));
23 23
         
24
-        if(!empty($passExp) && Carbon::now() > $passExp && !empty(config('users.passExpires')))
24
+        if (!empty($passExp) && Carbon::now()>$passExp && !empty(config('users.passExpires')))
25 25
         {
26 26
             Log::notice('User ID-'.Auth::user()->user_id.' is being forced to change their password.');
27 27
             $request->session()->flash('change_password', 'change_password');
Please login to merge, or discard this patch.
app/Console/Commands/BackupApplication.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $i = 0;
40 40
         do
41 41
         {
42
-            if($i)
42
+            if ($i)
43 43
             {
44 44
                 $backupName = $backupBase.'('.$i.')';
45 45
             }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
                 $backupName = $backupBase;
49 49
             }
50 50
             $i++;
51
-        } while(Storage::disk('backup')->exists($backupName.'.zip'));
51
+        } while (Storage::disk('backup')->exists($backupName.'.zip'));
52 52
         
53 53
         //  Write a file that shows the system version    
54 54
         $version = new \PragmaRX\Version\Package\Version();
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,7 @@
 block discarded – undo
42 42
             if($i)
43 43
             {
44 44
                 $backupName = $backupBase.'('.$i.')';
45
-            }
46
-            else
45
+            } else
47 46
             {
48 47
                 $backupName = $backupBase;
49 48
             }
Please login to merge, or discard this patch.
app/Http/Controllers/DashboardController.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     public function markNotification($id)
41 41
     {
42 42
         $notification = Auth::user()->notifications()->where('id', $id)->first();
43
-        if($notification)
43
+        if ($notification)
44 44
         {
45 45
             $notification->delete();
46 46
             Log::info('Notification ID-'.$id.' deleted for User ID-'.Auth::user()->user_id);
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,8 +44,7 @@
 block discarded – undo
44 44
         {
45 45
             $notification->delete();
46 46
             Log::info('Notification ID-'.$id.' deleted for User ID-'.Auth::user()->user_id);
47
-        }
48
-        else
47
+        } else
49 48
         {
50 49
             Log::notice('Notification ID-'.$id.' not found for user ID-'.Auth::user()->user_id);
51 50
         }
Please login to merge, or discard this patch.
app/Http/Controllers/InstallerController.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@  discard block
 block discarded – undo
27 27
         $cats = SystemCategories::all();
28 28
         $sysArr = [];
29 29
         //  Populate that list with the matching systems
30
-        foreach($cats as $cat)
30
+        foreach ($cats as $cat)
31 31
         {
32 32
             $systems = SystemTypes::where('cat_id', $cat->cat_id)->get();
33
-            if(!$systems->isEmpty())
33
+            if (!$systems->isEmpty())
34 34
             {
35
-                foreach($systems as $sys)
35
+                foreach ($systems as $sys)
36 36
                 {
37 37
                     $sysArr[$cat->name][] = $sys->name;
38 38
                 }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         
68 68
         Log::info('Tech Bench Settings Updated', ['user_id' => Auth::user()->user_id]);
69 69
         
70
-        return redirect()->back()->with('success', 'Tech Bench Successfully Updated');//
70
+        return redirect()->back()->with('success', 'Tech Bench Successfully Updated'); //
71 71
     }
72 72
     
73 73
     //  Upload and submit a new site logo
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
             'mail.username'   => $request->username,
112 112
         ]);
113 113
         
114
-        if(!empty($request->password))
114
+        if (!empty($request->password))
115 115
         {
116 116
             config(['mail.password' => $request->password]);
117 117
         }
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
             Mail::to(Auth::user()->email)->send(new TestEmail());
124 124
             return 'success';
125 125
         }
126
-        catch(Exception $e)
126
+        catch (Exception $e)
127 127
         {
128 128
             Log::notice('Test Email Failed.  Message: '.$e);
129 129
             $msg = '['.$e->getCode().'] "'.$e->getMessage().'" on line '.$e->getTrace()[0]['line'].' of file '.$e->getTrace()[0]['file'];
@@ -146,13 +146,13 @@  discard block
 block discarded – undo
146 146
         Settings::where('key', 'mail.port')->update(['value' => $request->port]);
147 147
         Settings::where('key', 'mail.encryption')->update(['value' => $request->encryption]);
148 148
         Settings::where('key', 'mail.username')->update(['value' => $request->username]);
149
-        if(!empty($request->password))
149
+        if (!empty($request->password))
150 150
         {
151 151
             Settings::where('key', 'mail.password')->update(['value' => $request->password]);
152 152
         }
153 153
          
154 154
         Log::info('Email Settings have been changed by User ID-'.Auth::user()->user_id);
155
-        return redirect()->back()->with('success', 'Tech Bench Successfully Updated');//
155
+        return redirect()->back()->with('success', 'Tech Bench Successfully Updated'); //
156 156
     }
157 157
     
158 158
     //  User settings form
@@ -174,14 +174,14 @@  discard block
 block discarded – undo
174 174
         
175 175
         //  Determine if the password expires field is updated
176 176
         $oldExpire = config('users.passExpires');
177
-        if($request->passExpire != $oldExpire)
177
+        if ($request->passExpire != $oldExpire)
178 178
         {
179 179
             //  Update the setting in the database
180 180
             Settings::where('key', 'users.passExpires')->update([
181 181
                 'value' => $request->passExpire
182 182
             ]);
183 183
             //  If the setting is changing from never to xx days, update all users
184
-            if($request->passExpire == 0)
184
+            if ($request->passExpire == 0)
185 185
             {
186 186
                 User::whereNotNull('password_expires')->update([
187 187
                     'password_expires' => null
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,8 +36,7 @@  discard block
 block discarded – undo
36 36
                 {
37 37
                     $sysArr[$cat->name][] = $sys->name;
38 38
                 }
39
-            }
40
-            else
39
+            } else
41 40
             {
42 41
                 $sysArr[$cat->name] = null;
43 42
             }
@@ -122,8 +121,7 @@  discard block
 block discarded – undo
122 121
             Log::info('Test Email Successfully Sent to '.Auth::user()->email);
123 122
             Mail::to(Auth::user()->email)->send(new TestEmail());
124 123
             return 'success';
125
-        }
126
-        catch(Exception $e)
124
+        } catch(Exception $e)
127 125
         {
128 126
             Log::notice('Test Email Failed.  Message: '.$e);
129 127
             $msg = '['.$e->getCode().'] "'.$e->getMessage().'" on line '.$e->getTrace()[0]['line'].' of file '.$e->getTrace()[0]['file'];
@@ -186,8 +184,7 @@  discard block
 block discarded – undo
186 184
                 User::whereNotNull('password_expires')->update([
187 185
                     'password_expires' => null
188 186
                 ]);
189
-            }
190
-            else
187
+            } else
191 188
             {
192 189
                 $newExpire = Carbon::now()->addDays($request->passExpire);
193 190
                 User::whereNull('password_expires')->update([
Please login to merge, or discard this patch.