Test Setup Failed
Branch testing (82409b)
by Ron
09:40
created
app/Http/Controllers/InstallerController.php 2 patches
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -25,12 +25,12 @@  discard block
 block discarded – undo
25 25
         $cats = SystemCategories::all();
26 26
         $sysArr = [];
27 27
         //  Populate that list with the matching systems
28
-        foreach($cats as $cat)
28
+        foreach ($cats as $cat)
29 29
         {
30 30
             $systems = SystemTypes::where('cat_id', $cat->cat_id)->get();
31
-            if(!$systems->isEmpty())
31
+            if (!$systems->isEmpty())
32 32
             {
33
-                foreach($systems as $sys)
33
+                foreach ($systems as $sys)
34 34
                 {
35 35
                     $sysArr[$cat->name][] = $sys->name;
36 36
                 }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         
66 66
         Log::info('Tech Bench Settings Updated', ['user_id' => Auth::user()->user_id]);
67 67
         
68
-        return redirect()->back()->with('success', 'Tech Bench Successfully Updated');//
68
+        return redirect()->back()->with('success', 'Tech Bench Successfully Updated'); //
69 69
     }
70 70
     
71 71
     //  Email settings form
@@ -89,12 +89,12 @@  discard block
 block discarded – undo
89 89
         Settings::where('key', 'mail.port')->update(['value' => $request->port]);
90 90
         Settings::where('key', 'mail.encryption')->update(['value' => $request->encryption]);
91 91
         Settings::where('key', 'mail.username')->update(['value' => $request->username]);
92
-        if(!empty($request->password))
92
+        if (!empty($request->password))
93 93
         {
94 94
             Settings::where('key', 'mail.password')->update(['value' => $request->password]);
95 95
         }
96 96
             
97
-        return redirect()->back()->with('success', 'Tech Bench Successfully Updated');//
97
+        return redirect()->back()->with('success', 'Tech Bench Successfully Updated'); //
98 98
     }
99 99
     
100 100
     //  Form to create a new Category
@@ -143,13 +143,13 @@  discard block
 block discarded – undo
143 143
         $sysID = $sysData->sys_id;
144 144
         $i = 0;
145 145
         
146
-        foreach($request->custField as $field)
146
+        foreach ($request->custField as $field)
147 147
         {
148
-            if(!empty($field))
148
+            if (!empty($field))
149 149
             {
150 150
                 $id = SystemCustDataTypes::where('name', $field)->first();
151 151
 
152
-                if(is_null($id))
152
+                if (is_null($id))
153 153
                 {
154 154
                     $newField = SystemCustDataTypes::create([
155 155
                         'name' => $field
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
         
174 174
         Log::info('New System Created', ['cat_id' => $request->catName, 'sys_name' => $request->name, 'user_id' => Auth::user()->user_id]);
175 175
         
176
-        return redirect()->back()->with('success', 'System Successfully Added');//
176
+        return redirect()->back()->with('success', 'System Successfully Added'); //
177 177
     }
178 178
     
179 179
     //  Form to edit an existing system
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
         $sysName = SystemTypes::find($sysID)->name;
201 201
         
202 202
         //  Change the name of the system if it has been modified
203
-        if($sysName !== $request->name)
203
+        if ($sysName !== $request->name)
204 204
         {
205 205
             SystemTypes::find($sysID)->update([
206 206
                 'name' => $request->name
@@ -213,19 +213,19 @@  discard block
 block discarded – undo
213 213
             ->get();
214 214
         
215 215
         $i = 0;
216
-        foreach($request->custField as $field)
216
+        foreach ($request->custField as $field)
217 217
         {
218 218
             $found = false;
219
-            if(!empty($field))
219
+            if (!empty($field))
220 220
             {
221 221
                 //  Check if the field already exists
222
-                foreach($dataType as $type)
222
+                foreach ($dataType as $type)
223 223
                 {
224
-                    if($type->name === $field)
224
+                    if ($type->name === $field)
225 225
                     {
226 226
                         $found = true;
227 227
                         //  See if the order has changed
228
-                        if($type->order != $i)
228
+                        if ($type->order != $i)
229 229
                         {
230 230
                             SystemCustDataFields::find($type->field_id)->update(
231 231
                             [
@@ -235,11 +235,11 @@  discard block
 block discarded – undo
235 235
                     }
236 236
                 }
237 237
                 //  If the field does not exist, create it
238
-                if(!$found)
238
+                if (!$found)
239 239
                 {
240 240
                     $id = SystemCustDataTypes::where('name', $field)->first();
241 241
 
242
-                    if(is_null($id))
242
+                    if (is_null($id))
243 243
                     {
244 244
                         $newField = SystemCustDataTypes::create([
245 245
                             'name' => $field
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@  discard block
 block discarded – undo
34 34
                 {
35 35
                     $sysArr[$cat->name][] = $sys->name;
36 36
                 }
37
-            }
38
-            else
37
+            } else
39 38
             {
40 39
                 $sysArr[$cat->name] = null;
41 40
             }
@@ -155,8 +154,7 @@  discard block
 block discarded – undo
155 154
                         'name' => $field
156 155
                     ]);
157 156
                     $id = $newField->data_type_id;
158
-                }
159
-                else
157
+                } else
160 158
                 {
161 159
                     $id = $id->data_type_id;
162 160
                 }
@@ -245,8 +243,7 @@  discard block
 block discarded – undo
245 243
                             'name' => $field
246 244
                         ]);
247 245
                         $id = $newField->data_type_id;
248
-                    }
249
-                    else
246
+                    } else
250 247
                     {
251 248
                         $id = $id->data_type_id;
252 249
                     }
Please login to merge, or discard this patch.
app/Http/Controllers/CustomerDetails.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         $custDetails = Customers::find($id);
56 56
         
57 57
         //  Check for empty data set
58
-        if(empty($custDetails))
58
+        if (empty($custDetails))
59 59
         {
60 60
             return view('err.customerNotFound');
61 61
         }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $custData = Customers::find($id)->update($request->all());
91 91
 
92 92
         //  Modify to the new ID number if set
93
-        if(isset($request->cust_id))
93
+        if (isset($request->cust_id))
94 94
         {
95 95
             $id = $request->cust_id;
96 96
         }
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,11 +49,11 @@  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
-            for($i=0; $i<count($request['phoneNumber']); $i++)
54
+            for ($i = 0; $i<count($request['phoneNumber']); $i++)
55 55
             {
56
-                if(!empty($request['phoneNumber'][$i]))
56
+                if (!empty($request['phoneNumber'][$i]))
57 57
                 {
58 58
                     CustomerContactPhones::create([
59 59
                         'cont_id' => $contID,
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $numberTypes = PhoneNumberType::all();
87 87
         
88 88
         $numTypes = [];
89
-        foreach($numberTypes as $type)
89
+        foreach ($numberTypes as $type)
90 90
         {
91 91
             $numTypes[$type->phone_type_id] = $type->description;
92 92
         }
@@ -112,9 +112,9 @@  discard block
 block discarded – undo
112 112
         
113 113
         //  Clear all contact phone numbers and re-enter them
114 114
         CustomerContactPhones::where('cont_id', $id)->delete();
115
-        if(!empty(array_filter($request['phoneNumber'])))
115
+        if (!empty(array_filter($request['phoneNumber'])))
116 116
         {
117
-            for($i=0; $i<count($request['phoneNumber']); $i++)
117
+            for ($i = 0; $i<count($request['phoneNumber']); $i++)
118 118
             {
119 119
                 CustomerContactPhones::create([
120 120
                     'cont_id'       => $id,
@@ -156,9 +156,9 @@  discard block
 block discarded – undo
156 156
         $vcard->addEmail($contact->email);
157 157
         $vcard->addAddress(null, null, $custData->address, $custData->city, $custData->state, $custData->zip, null);
158 158
         
159
-        if(!empty($numbers))
159
+        if (!empty($numbers))
160 160
         {
161
-            foreach($numbers as $phone)
161
+            foreach ($numbers as $phone)
162 162
             {
163 163
                 $vcard->addPhoneNumber($phone->phone_number, $phone->description);
164 164
             }
Please login to merge, or discard this patch.
app/Http/Controllers/CustomerController.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
                 ->with('CustomerSystems.SystemTypes')
53 53
                 ->whereHas('CustomerSystems', function($q) use($request)
54 54
                 {
55
-                   $q->where('sys_id', $request->system);
55
+                    $q->where('sys_id', $request->system);
56 56
                 })
57 57
                 ->get();
58 58
         }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
             ->get();
28 28
         
29 29
         $sysArr = [];
30
-        foreach($systems as $sys)
30
+        foreach ($systems as $sys)
31 31
         {
32
-            foreach($sys->SystemTypes as $s)
32
+            foreach ($sys->SystemTypes as $s)
33 33
             {
34 34
                 $sysArr[$sys->name][$s->sys_id] = $s->name;
35 35
             }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     public function search(Request $request)
45 45
     {
46 46
         //  Run different request based on if system field is filled out or not
47
-        if(!empty($request->system))
47
+        if (!empty($request->system))
48 48
         {
49 49
             $customerData = Customers::where('name', 'like', '%'.$request->customer.'%')
50 50
                 ->where('city', 'like', '%'.$request->city.'%')
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@
 block discarded – undo
55 55
                    $q->where('sys_id', $request->system);
56 56
                 })
57 57
                 ->get();
58
-        }
59
-        else
58
+        } else
60 59
         {
61 60
             $customerData = Customers::where('name', 'like', '%'.$request->customer.'%')
62 61
                 ->where('city', 'like', '%'.$request->city.'%')
Please login to merge, or discard this patch.
app/Http/Controllers/CustomerSystemsController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
             ->get();
28 28
         
29 29
         $sysArr = [];
30
-        foreach($systems as $sys)
30
+        foreach ($systems as $sys)
31 31
         {
32
-            foreach($sys->SystemTypes as $s)
32
+            foreach ($sys->SystemTypes as $s)
33 33
             {
34 34
                 $sysArr[$sys->name][$s->sys_id] = $s->name;
35 35
             }
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         ]);
53 53
         $newSysID = $newSys->cust_sys_id;
54 54
         
55
-        foreach($request->field as $key => $field)
55
+        foreach ($request->field as $key => $field)
56 56
         {
57 57
             $fieldID = SystemCustDataFields::where('data_type_id', $key)->where('sys_id', $request->sysType)->first()->field_id;
58 58
             
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     {
82 82
         $custSystems = CustomerSystems::where('cust_id', $id)->get();
83 83
 
84
-        switch($custSystems->count())
84
+        switch ($custSystems->count())
85 85
         {
86 86
             case 0:
87 87
                 return view('customer.system_none');
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             default:
104 104
                 $systemData = [];
105 105
 
106
-                foreach($custSystems as $sys)
106
+                foreach ($custSystems as $sys)
107 107
                 {
108 108
                     $custSysID = $sys->cust_sys_id;
109 109
                     $sysName   = SystemTypes::find($sys->sys_id)->name;
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         $custSys = CustomerSystems::find($id);
144 144
         $sysID   = $custSys->sys_id;
145 145
         
146
-        foreach($request->field as $key => $field)
146
+        foreach ($request->field as $key => $field)
147 147
         {
148 148
             $fieldID = SystemCustDataFields::where('data_type_id', $key)->where('sys_id', $sysID)->first()->field_id;
149 149
             
Please login to merge, or discard this patch.
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.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
             ->get();
36 36
         
37 37
         $sysArr = [];
38
-        foreach($systems as $sys)
38
+        foreach ($systems as $sys)
39 39
         {
40
-            foreach($sys->SystemTypes as $s)
40
+            foreach ($sys->SystemTypes as $s)
41 41
             {
42 42
                 $sysArr[$sys->name][$s->sys_id] = $s->name;
43 43
             }
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     public function search(Request $request)
53 53
     {
54 54
         //  Run different request based on if system field is filled out or not
55
-        if(!empty($request->system))
55
+        if (!empty($request->system))
56 56
         {
57 57
             $tipData = TechTips::where('subject', 'like', '%'.$request->tipSearch.'%')
58 58
                 ->whereHas('TechTipSystems', function($q) use($request)
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
             ->get();
82 82
         
83 83
         $sysArr = [];
84
-        foreach($systems as $sys)
84
+        foreach ($systems as $sys)
85 85
         {
86
-            foreach($sys->SystemTypes as $s)
86
+            foreach ($sys->SystemTypes as $s)
87 87
             {
88 88
                 $sysArr[$sys->name][$s->sys_id] = $s->name;
89 89
             }
@@ -108,10 +108,10 @@  discard block
 block discarded – undo
108 108
         $tipID = $tip->tip_id;
109 109
 
110 110
         //  Enter all system tags associated with the tip
111
-        if(is_array($request->sysTags))
111
+        if (is_array($request->sysTags))
112 112
         {
113 113
             
114
-            foreach($request->sysTags as $tag)
114
+            foreach ($request->sysTags as $tag)
115 115
             {
116 116
                 TechTipSystems::create([
117 117
                     'tip_id' => $tipID,
@@ -128,10 +128,10 @@  discard block
 block discarded – undo
128 128
         }
129 129
         
130 130
         //  If there are any files, process them
131
-        if(!empty($request->file))
131
+        if (!empty($request->file))
132 132
         {
133 133
             $filePath = config('filesystems.paths.tips').DIRECTORY_SEPARATOR.$tipID;
134
-            foreach($request->file as $file)
134
+            foreach ($request->file as $file)
135 135
             {
136 136
                 //  Clean the file and store it
137 137
                 $fileName = Files::cleanFilename($filePath, $file->getClientOriginalName());
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         {
160 160
             Mail::to($userList)->send(new newTechtip($tipData));
161 161
         }
162
-        catch(Exception $e)
162
+        catch (Exception $e)
163 163
         {
164 164
             Log::error('Unable to email new Tech Tip.  Failed because of: '.$e);
165 165
         }
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     public function details($id, $name)
174 174
     {
175 175
         $tipData = TechTips::where('tip_id', $id)->with('user')->first();
176
-        if(empty($tipData))
176
+        if (empty($tipData))
177 177
         {
178 178
             return view('err.tipNotFound');
179 179
         }
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
     public function edit($id)
222 222
     {
223 223
         $tipData = TechTips::find($id);
224
-        if(empty($tipData))
224
+        if (empty($tipData))
225 225
         {
226 226
             return 'tip not found';
227 227
         }
@@ -244,9 +244,9 @@  discard block
 block discarded – undo
244 244
             ->get();
245 245
         
246 246
         $sysArr = [];
247
-        foreach($systems as $sys)
247
+        foreach ($systems as $sys)
248 248
         {
249
-            foreach($sys->SystemTypes as $s)
249
+            foreach ($sys->SystemTypes as $s)
250 250
             {
251 251
                 $sysArr[$sys->name][$s->sys_id] = $s->name;
252 252
             }
@@ -275,10 +275,10 @@  discard block
 block discarded – undo
275 275
         
276 276
         //  Enter all system tags associated with the tip after destroying the existing systems
277 277
         TechTipSystems::where('tip_id', $id)->delete();
278
-        if(is_array($request->sysTags))
278
+        if (is_array($request->sysTags))
279 279
         {
280 280
             
281
-            foreach($request->sysTags as $tag)
281
+            foreach ($request->sysTags as $tag)
282 282
             {
283 283
                 TechTipSystems::create([
284 284
                     'tip_id' => $id,
@@ -296,13 +296,13 @@  discard block
 block discarded – undo
296 296
         
297 297
         //  Determine if any files were removed
298 298
         $tipFiles = TechTipFiles::where('tip_id', $id)->get();
299
-        if(!$tipFiles->isEmpty())
299
+        if (!$tipFiles->isEmpty())
300 300
         {
301
-            if(!empty($request->existingFile))
301
+            if (!empty($request->existingFile))
302 302
             {
303
-                foreach($tipFiles as $file)
303
+                foreach ($tipFiles as $file)
304 304
                 {
305
-                    if(!in_array($file->file_id, $request->existingFile))
305
+                    if (!in_array($file->file_id, $request->existingFile))
306 306
                     {
307 307
                         TechTipFiles::where('file_id', $file->file_id)->delete();
308 308
                         Files::deleteFile($file->file_id);
@@ -317,10 +317,10 @@  discard block
 block discarded – undo
317 317
         }
318 318
         
319 319
         //  Process any new files
320
-        if(!empty($request->file))
320
+        if (!empty($request->file))
321 321
         {
322 322
             $filePath = config('filesystems.paths.tips').DIRECTORY_SEPARATOR.$id;
323
-            foreach($request->file as $file)
323
+            foreach ($request->file as $file)
324 324
             {
325 325
                 //  Clean the file and store it
326 326
                 $fileName = Files::cleanFilename($filePath, $file->getClientOriginalName());
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
             Log::error('Unable to email new Tech Tip.  Failed because of: '.$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.
app/Http/Controllers/UserLinksController.php 3 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   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,12 +25,12 @@  discard block
 block discarded – undo
25 25
         $details = FileLinks::where('link_hash', $id)->first();
26 26
         
27 27
         //  Verify that the link is valid
28
-        if(empty($details))
28
+        if (empty($details))
29 29
         {
30 30
             return view('links.guest.badLink');
31 31
         }
32 32
         //  Verify that the link has not expired
33
-        else if($details->expire <= date('Y-m-d'))
33
+        else if ($details->expire<=date('Y-m-d'))
34 34
         {
35 35
             return view('links.guest.expiredLink');
36 36
         }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         
56 56
         $filePath = config('filesystems.paths.links').DIRECTORY_SEPARATOR.$details->link_id;
57 57
 
58
-        foreach($request->file as $file)
58
+        foreach ($request->file as $file)
59 59
         {
60 60
             //  Clean the file and store it
61 61
             $fileName = Files::cleanFilename($filePath, $file->getClientOriginalName());
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                 'upload' => 1
77 77
             ]);
78 78
             
79
-            if(!empty($request->note))
79
+            if (!empty($request->note))
80 80
             {
81 81
                 FileLinkNotes::create([
82 82
                     'link_id' => $details->link_id,
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         {
93 93
             Mail::to($user)->send(new NewLinkFile($details));
94 94
         }
95
-        catch(Exception $e)
95
+        catch (Exception $e)
96 96
         {
97 97
             Log::error('Email not sent to user id'.$details->user_id.'.  Failed because of: '.$e);
98 98
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,7 @@
 block discarded – undo
91 91
         try
92 92
         {
93 93
             Mail::to($user)->send(new NewLinkFile($details));
94
-        }
95
-        catch(Exception $e)
94
+        } catch(Exception $e)
96 95
         {
97 96
             Log::error('Email not sent to user id'.$details->user_id.'.  Failed because of: '.$e);
98 97
         }
Please login to merge, or discard this patch.
app/Http/Controllers/CustomerFilesController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     {
24 24
         $fileTypes = CustomerFileTypes::all();
25 25
         $fTypes = [];
26
-        foreach($fileTypes as $type)
26
+        foreach ($fileTypes as $type)
27 27
         {
28 28
             $fTypes[$type->file_type_id] = $type->description;
29 29
         }
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         $custFile = CustomerFiles::find($id);
94 94
         $fileTypes = CustomerFileTypes::all();
95 95
         $fTypes = [];
96
-        foreach($fileTypes as $type)
96
+        foreach ($fileTypes as $type)
97 97
         {
98 98
             $fTypes[$type->file_type_id] = $type->description;
99 99
         }
Please login to merge, or discard this patch.
app/Http/Controllers/UserController.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         //  Get the users information
144 144
         $userData = User::where('username', $valid->username)->first();
145 145
         
146
-         //  Update the password
146
+            //  Update the password
147 147
         User::find($userData->user_id)->update(
148 148
         [
149 149
             'password'   => bcrypt($request->newPass)
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
             'password'   => 'required|string|min:6|confirmed'
181 181
         ]);
182 182
         
183
-         //  Update the user data
183
+            //  Update the user data
184 184
         User::find($id)->update(
185 185
         [
186 186
             'password'   => bcrypt($request->password)
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
     //  Deactivae an active user
253 253
     public function destroy($id)
254 254
     {
255
-         //  Update the user data
255
+            //  Update the user data
256 256
         User::find($id)->update(
257 257
         [
258 258
             'active'   => 0
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
         $roles = Role::all();
39 39
         
40 40
         $roleArr = [];
41
-        foreach($roles as $role)
41
+        foreach ($roles as $role)
42 42
         {
43
-            if($role->role_id == 1 && Auth::user()->role_id != 1)
43
+            if ($role->role_id == 1 && Auth::user()->role_id != 1)
44 44
             {
45 45
                 continue;
46 46
             }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         {
96 96
             Mail::to($request->email)->send(new InitializeUser($hash, $request->username, $request->first_name.' '.$request->last_name));
97 97
         }
98
-        catch(Exception $e)
98
+        catch (Exception $e)
99 99
         {
100 100
             Log::error('Email not sent to new user'.$request->email.'.  Failed because of: '.$e);
101 101
         }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         //  Validate the hash token
114 114
         $user = UserInitialize::where('token', $hash)->get();
115 115
         
116
-        if($user->isEmpty())
116
+        if ($user->isEmpty())
117 117
         {
118 118
             return abort(404);
119 119
         }
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     {
127 127
         //  Verify that the link matches the assigned email address
128 128
         $valid = UserInitialize::where('token', $hash)->first();
129
-        if(empty($valid))
129
+        if (empty($valid))
130 130
         {
131 131
             return abort(404);
132 132
         }
@@ -198,9 +198,9 @@  discard block
 block discarded – undo
198 198
         $userRole = DB::select('SELECT `role_id` FROM `user_role` WHERE `user_id` = ?', [$id])[0]->role_id;
199 199
         
200 200
         $roleArr = [];
201
-        foreach($roles as $role)
201
+        foreach ($roles as $role)
202 202
         {
203
-            if($role->role_id == 1 && Auth::user()->role_id != 1)
203
+            if ($role->role_id == 1 && Auth::user()->role_id != 1)
204 204
             {
205 205
                 continue;
206 206
             }
Please login to merge, or discard this patch.
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
             Log::error('Email not sent to new user'.$request->email.'.  Failed because of: '.$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.