Passed
Push — dev5 ( 1c1697...6a3ae7 )
by Ron
08:21
created
app/Http/Controllers/FileLinks/GuestLinksController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
 
52 52
         if($files == 0 && $details->allow_upload === 'No')
53 53
         {
54
-            Log::warning('Visitor ' . \Request::ip() . ' visited a link that they cannot do anything with.  Hash - ' . $id);
54
+            Log::warning('Visitor '.\Request::ip().' visited a link that they cannot do anything with.  Hash - '.$id);
55 55
             return view('links.guestDeadLink');
56 56
         }
57 57
 
58
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by IP Address ' . \Request::ip());
58
+        Log::debug('Route '.Route::currentRouteName().' visited by IP Address '.\Request::ip());
59 59
         return view('links.guestDetails', [
60 60
             'hash'    => $id,
61 61
             'details' => $details,
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     //  Get the guest available files for the link
68 68
     public function getFiles($id)
69 69
     {
70
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by IP Address ' . \Request::ip());
70
+        Log::debug('Route '.Route::currentRouteName().' visited by IP Address '.\Request::ip());
71 71
         $linkID = FileLinks::where('link_hash', $id)->first()->link_id;
72 72
 
73 73
         $files = new FileLinkFilesCollection(
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     //  Upload new file
85 85
     public function update(Request $request, $id)
86 86
     {
87
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by IP Address ' . \Request::ip().'. Submitted Data - ', $request->toArray());
87
+        Log::debug('Route '.Route::currentRouteName().' visited by IP Address '.\Request::ip().'. Submitted Data - ', $request->toArray());
88 88
         $request->validate(['name' => 'required', 'file' => 'required']);
89 89
 
90 90
         $receiver = new FileReceiver('file', $request, HandlerFactory::classFromRequest($request));
Please login to merge, or discard this patch.
app/Http/Controllers/FileLinks/FileLinksController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     //  Ajax call to show the links for a specific user
48 48
     public function find($id)
49 49
     {
50
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
50
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
51 51
 
52 52
         //  Verify if the user is trying to pull their own links
53 53
         if($id == 0)
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
             $id = Auth::user()->user_id;
56 56
         }
57 57
         //  If the user is trying to pull someone elses links, they must be able to manage users
58
-        else if ($id != Auth::user()->user_id)
58
+        else if($id != Auth::user()->user_id)
59 59
         {
60 60
             $this->authorize('hasAccess', 'manage_users');
61 61
         }
@@ -72,14 +72,14 @@  discard block
 block discarded – undo
72 72
     //  Create a new file link form
73 73
     public function create()
74 74
     {
75
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
75
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
76 76
         return view('links.newLink');
77 77
     }
78 78
 
79 79
     //  Submit the new file link form
80 80
     public function store(Request $request)
81 81
     {
82
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
82
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
83 83
 
84 84
         $request->validate([
85 85
             'name'       => 'required',
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     //  Create the new file link
154 154
     private function createLink($data)
155 155
     {
156
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $data->toArray());
156
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $data->toArray());
157 157
 
158 158
         //  Generate a random hash to use as the file link and make sure it is not already in use
159 159
         do
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     //  Save a file attached to the link
182 182
     private function saveFile(UploadedFile $file)
183 183
     {
184
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
184
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
185 185
 
186 186
         $filePath = config('filesystems.paths.links').DIRECTORY_SEPARATOR.'_tmp';
187 187
 
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
     //  Show details about a file link
210 210
     public function details($id, /** @scrutinizer ignore-unused */ $name)
211 211
     {
212
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
212
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
213 213
 
214 214
         //  Verify that the link is a valid link
215 215
         $linkData = FileLinks::find($id);
@@ -234,14 +234,14 @@  discard block
 block discarded – undo
234 234
     {
235 235
         $linkData = new FileLinksResource(FileLinks::find($id));
236 236
 
237
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
237
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
238 238
         return $linkData;
239 239
     }
240 240
 
241 241
     //  Update the link's details
242 242
     public function update(Request $request, $id)
243 243
     {
244
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
244
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
245 245
 
246 246
         $request->validate([
247 247
             'name'       => 'required',
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
         ]);
272 272
 
273 273
         Log::info('User '.Auth::user()->full_name.' disabled link ID - '.$id);
274
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
274
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
275 275
         return response()->json(['success' => true]);
276 276
     }
277 277
 
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 
295 295
         FileLinks::find($id)->delete();
296 296
 
297
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
297
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
298 298
         Log::info('File link deleted by '.Auth::user()->full_name, ['link_id' => $id, 'user_id' => Auth::user()->user_id]);
299 299
 
300 300
         return response()->json([
Please login to merge, or discard this patch.
app/Http/Controllers/FileLinks/LinkFilesController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     //  Add a file to the file link
35 35
     public function store(Request $request)
36 36
     {
37
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
37
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
38 38
 
39 39
         $request->validate([
40 40
             'linkID' => 'required|exists:file_links,link_id'
@@ -98,14 +98,14 @@  discard block
 block discarded – undo
98 98
             ->get()
99 99
         );
100 100
 
101
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
101
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
102 102
         return $files;
103 103
     }
104 104
 
105 105
     //  Move a file to a customer file
106 106
     public function update(Request $request, $id)
107 107
     {
108
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
108
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
109 109
 
110 110
         $request->validate([
111 111
             'fileID'   => 'required',
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
         //  Delete the file from the folder (not, will not delete if in use elsewhere)
167 167
         Files::deleteFile($fileID);
168 168
 
169
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
169
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
170 170
         Log::info('File ID-'.$fileData->file_id.' deleted for Link ID-'.$fileData->link_id.' by '.Auth::user()->user_id);
171 171
         return response()->json(['success' => true]);
172 172
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/UserController.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     public function __construct()
26 26
     {
27 27
         $this->middleware('auth')->except('initializeUser', 'submitInitializeUser');
28
-        $this->middleware(function ($request, $next) {
28
+        $this->middleware(function($request, $next) {
29 29
             $this->authorize('hasAccess', 'Manage Users');
30 30
             return $next($request);
31 31
         });
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $userList = User::with('LastUserLogin')->get()->makeVisible('user_id');
38 38
         $route    = 'admin.user.edit';
39 39
 
40
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
40
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
41 41
         Log::debug('User list:', $userList->toArray());
42 42
         return view('admin.userIndex', [
43 43
             'userList' => $userList,
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     //  Check if a username is in use
49 49
     public function checkUser($username, $type)
50 50
     {
51
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data:', ['username' => $username, 'type' => $type]);
51
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data:', ['username' => $username, 'type' => $type]);
52 52
         $user = User::where($type, $username)->first();
53 53
 
54 54
         if(!$user)
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             }
92 92
         }
93 93
 
94
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
94
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
95 95
         Log::debug('Role data: ', $roleArr);
96 96
         return view('admin.newUser', [
97 97
             'roles' => $roleArr
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     //  Submit the Add User form
102 102
     public function store(Request $request)
103 103
     {
104
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data:', $request->toArray());
104
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data:', $request->toArray());
105 105
         //  Validate the new user form
106 106
         $request->validate([
107 107
             'role'       => 'required|numeric|exists:user_role_types,role_id',
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     //  List all inactive users
146 146
     public function show($type)
147 147
     {
148
-        $route    = '';
148
+        $route = '';
149 149
 
150 150
         if($type !== 'inactive')
151 151
         {
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
                 ->makeVisible('user_id'));
157 157
                 // dd($userList);
158 158
 
159
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
159
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
160 160
 
161 161
         return view('admin.userDeleted', [
162 162
             'userList' => $userList,
@@ -171,10 +171,10 @@  discard block
 block discarded – undo
171 171
         $roles = UserRoleType::all();
172 172
         $user  = new UserResource(User::findOrFail($id));
173 173
 
174
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
174
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
175 175
 
176 176
         //  Make sure that the user is not trying to edit someone with more permissions
177
-        if ($user->role_id < Auth::user()->role_id)
177
+        if($user->role_id < Auth::user()->role_id)
178 178
         {
179 179
             Log::warning('User '.Auth::user()->full_name.' tried to update a user that has more permissions than they do.  This request was denied.');
180 180
             return abort(403);
@@ -182,10 +182,10 @@  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
+            if($role->role_id == 1 && Auth::user()->role_id != 1) {
187 187
                 continue;
188
-            } else if ($role->role_id == 2 && Auth::user()->role_id > 1) {
188
+            } else if($role->role_id == 2 && Auth::user()->role_id > 1) {
189 189
                 continue;
190 190
             } else {
191 191
                 // $roleArr[$role->role_id] = $role->name;
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
     //  Reactivate a disabled user
209 209
     public function reactivateUser($id)
210 210
     {
211
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
211
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
212 212
         User::withTrashed()->where('user_id', $id)->restore();
213 213
 
214 214
         Log::info('User ID '.$id.' reactivated by '.Auth::user()->full_name);
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
     //  Submit the update user form
221 221
     public function update(Request $request, $id)
222 222
     {
223
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data:', $request->toArray());
223
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data:', $request->toArray());
224 224
         $request->validate([
225 225
             'username'   => [
226 226
                                 'required',
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
         //  Update the user data
239 239
         $user = User::findOrFail($id);
240 240
 
241
-        if ($user->role_id < Auth::user()->role_id)
241
+        if($user->role_id < Auth::user()->role_id)
242 242
         {
243 243
             return abort(403);
244 244
         }
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
     //  Submit the change password form
261 261
     public function submitPassword(Request $request)
262 262
     {
263
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
263
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
264 264
 
265 265
         $request->validate([
266 266
             'password' => 'required|string|min:6|confirmed',
@@ -279,12 +279,12 @@  discard block
 block discarded – undo
279 279
         $user = User::find($request->user_id);
280 280
 
281 281
         //  Verify this is a valid user ID
282
-        if (!$user) {
282
+        if(!$user) {
283 283
             $success = false;
284 284
             $reason  = 'Cannot find user with this ID';
285 285
         }
286 286
         //  Make sure that the user is not trying to deactivate someone with more permissions
287
-        else if ($user->role_id < Auth::user()->role_id) {
287
+        else if($user->role_id < Auth::user()->role_id) {
288 288
             $success = false;
289 289
             $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 290
         }
@@ -297,10 +297,10 @@  discard block
 block discarded – undo
297 297
                 'password_expires' => $nextChange
298 298
             ]);
299 299
             $success = true;
300
-            $reason  = 'Password for ' . $user->full_name . ' successfully reset.';
300
+            $reason  = 'Password for '.$user->full_name.' successfully reset.';
301 301
         }
302 302
 
303
-        Log::info('User ID-' . $request->user_id . ' password chagned by ' . Auth::user()->Full_name, [
303
+        Log::info('User ID-'.$request->user_id.' password chagned by '.Auth::user()->Full_name, [
304 304
             'success' => $success,
305 305
             'reason'  => $reason,
306 306
         ]);
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
             $reason  = 'User '.$user->full_name.' successfully deactivated.';
344 344
         }
345 345
 
346
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
346
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
347 347
         Log::notice('User ID-'.$id.' disabled by '.Auth::user()->full_name, [
348 348
             'success' => $success,
349 349
             'reason'  => $reason,
Please login to merge, or discard this patch.
app/Http/Controllers/TechTips/TechTipCommentsController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     //  Add a new Tech Tip Comment
24 24
     public function store(Request $request)
25 25
     {
26
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
26
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
27 27
 
28 28
         $request->validate([
29 29
             'comment' => 'required',
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     //  Retrieve the comments for a tech tip
49 49
     public function show($id)
50 50
     {
51
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
51
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
52 52
 
53 53
         return TechTipComments::where('tip_id', $id)->with('user')->get();
54 54
     }
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     //  Delete a comment
57 57
     public function destroy($id)
58 58
     {
59
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
59
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
60 60
 
61 61
         TechTipComments::find($id)->delete();
62 62
 
Please login to merge, or discard this patch.
app/Http/Controllers/TechTips/TechTipsController.php 2 patches
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     //  Tech Tips landing page
38 38
     public function index()
39 39
     {
40
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
40
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
41 41
 
42 42
         $tipTypes = new TechTipTypesCollection(TechTipTypes::all());
43 43
         $sysList  = new CategoriesCollection(SystemCategories::with('SystemTypes')->with('SystemTypes.SystemDataFields.SystemDataFieldTypes')->get());
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
     //  Search for an existing tip - If no paramaters, return all tips
51 51
     public function search(Request $request)
52 52
     {
53
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
53
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
54 54
 
55 55
         //  See if there are any search paramaters entered
56
-        if (!$request->search['searchText'] && !isset($request->search['articleType']) && !isset($request->search['systemType'])) {
56
+        if(!$request->search['searchText'] && !isset($request->search['articleType']) && !isset($request->search['systemType'])) {
57 57
             //  No search paramaters, send all tech tips
58 58
             $tips = new TechTipsCollection(
59 59
                 TechTips::orderBy('created_at', 'DESC')
@@ -62,21 +62,21 @@  discard block
 block discarded – undo
62 62
             );
63 63
         } else {
64 64
             $article = isset($request->search['articleType']) ? true : false;
65
-            $system  = isset($request->search['systemType'])  ? true : false;
65
+            $system  = isset($request->search['systemType']) ? true : false;
66 66
             //  Search paramaters, filter results
67 67
             $tips = new TechTipsCollection(
68 68
                 TechTips::orderBy('created_at', 'DESC')
69 69
                     //  Search by id or a phrase in the title or description
70
-                    ->where(function ($query) use ($request) {
71
-                        $query->where('subject', 'like', '%' . $request->search['searchText'] . '%')
72
-                            ->orWhere('tip_id', 'like', '%' . $request->search['searchText'] . '%')
73
-                            ->orWhere('description', 'like', '%' . $request->search['searchText'] . '%');
70
+                    ->where(function($query) use ($request) {
71
+                        $query->where('subject', 'like', '%'.$request->search['searchText'].'%')
72
+                            ->orWhere('tip_id', 'like', '%'.$request->search['searchText'].'%')
73
+                            ->orWhere('description', 'like', '%'.$request->search['searchText'].'%');
74 74
                     })
75
-                    ->when($article, function ($query) use ($request) {
75
+                    ->when($article, function($query) use ($request) {
76 76
                         $query->whereIn('tip_type_id', $request->search['articleType']);
77 77
                     })
78
-                    ->when($system, function ($query) use ($request) {
79
-                        $query->whereHas('SystemTypes', function ($query) use ($request) {
78
+                    ->when($system, function($query) use ($request) {
79
+                        $query->whereHas('SystemTypes', function($query) use ($request) {
80 80
                             $query->whereIn('system_types.sys_id', $request->search['systemType']);
81 81
                         });
82 82
                     })
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     //  Process an image that is attached to a tech tip
92 92
     public function processImage(Request $request)
93 93
     {
94
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
94
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
95 95
 
96 96
         $this->authorize('hasAccess', 'Create Tech Tip');
97 97
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     //  Create a new Tech Tip form
111 111
     public function create()
112 112
     {
113
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
113
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
114 114
         $this->authorize('hasAccess', 'Create Tech Tip');
115 115
 
116 116
         $typesArr   = new TechTipTypesCollection(TechTipTypes::all());
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     //  Submit the form to create a new tech tip
127 127
     public function store(Request $request)
128 128
     {
129
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
129
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
130 130
 
131 131
         $this->authorize('hasAccess', 'Create Tech Tip');
132 132
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         $save = $receiver->receive();
152 152
 
153 153
         //  See if the uploade has finished
154
-        if ($save->isFinished()) {
154
+        if($save->isFinished()) {
155 155
             $this->saveFile($save->getFile());
156 156
 
157 157
             return 'uploaded successfully';
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         //  Get the current progress
161 161
         $handler = $save->handler();
162 162
 
163
-        Log::debug('File being uploaded.  Percentage done - ' . $handler->getPercentageDone());
163
+        Log::debug('File being uploaded.  Percentage done - '.$handler->getPercentageDone());
164 164
         return response()->json([
165 165
             'done'   => $handler->getPercentageDone(),
166 166
             'status' => true
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         }
200 200
 
201 201
         //  Log stored file
202
-        Log::info('File Stored', ['file_id' => $fileID, 'file_path' => $filePath . DIRECTORY_SEPARATOR . $fileName]);
202
+        Log::info('File Stored', ['file_id' => $fileID, 'file_path' => $filePath.DIRECTORY_SEPARATOR.$fileName]);
203 203
         return $fileID;
204 204
     }
205 205
 
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
     //  Details controller - will move to the show controller with just the tech tip id
268 268
     public function details($id, $subject)
269 269
     {
270
-        if (session()->has('newTipFile')) {
270
+        if(session()->has('newTipFile')) {
271 271
             session()->forget('newTipFile');
272 272
         }
273 273
 
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
     //  Show the details about the tech tip
278 278
     public function show($id)
279 279
     {
280
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
280
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
281 281
 
282 282
         $tipData = TechTips::where('tip_id', $id)->with('User')->with('SystemTypes')->first();
283 283
 
@@ -299,9 +299,9 @@  discard block
 block discarded – undo
299 299
     //  Add or remove this tip as a favorite of the user
300 300
     public function toggleFav($action, $id)
301 301
     {
302
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
302
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
303 303
 
304
-        switch ($action) {
304
+        switch($action) {
305 305
             case 'add':
306 306
                 TechTipFavs::create([
307 307
                     'user_id' => Auth::user()->user_id,
@@ -325,12 +325,12 @@  discard block
 block discarded – undo
325 325
     //  Edit an existing tech tip
326 326
     public function edit($id)
327 327
     {
328
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
328
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
329 329
 
330 330
         $this->authorize('hasAccess', 'Edit Tech Tip');
331 331
         $tipData = TechTips::where('tip_id', $id)->with('User')->with('SystemTypes')->with('TechTipTypes')->first();
332 332
 
333
-        if (!$tipData) {
333
+        if(!$tipData) {
334 334
             return view('tips.tipNotFound');
335 335
         }
336 336
 
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
     //  Store the edited Tech Tip
350 350
     public function update(Request $request, $id)
351 351
     {
352
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
352
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
353 353
 
354 354
         $this->authorize('hasAccess', 'Edit Tech Tip');
355 355
 
@@ -363,9 +363,9 @@  discard block
 block discarded – undo
363 363
         $receiver = new FileReceiver('file', $request, HandlerFactory::classFromRequest($request));
364 364
 
365 365
         //  Verify if there is a file to be processed or not
366
-        if ($receiver->isUploaded() === false || $request->_completed) {
366
+        if($receiver->isUploaded() === false || $request->_completed) {
367 367
             $this->storeUpdatedTip($request, $id);
368
-            Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id);
368
+            Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id);
369 369
             return response()->json(['tip_id' => $id]);
370 370
         }
371 371
 
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
         $save = $receiver->receive();
374 374
 
375 375
         //  See if the uploade has finished
376
-        if ($save->isFinished()) {
376
+        if($save->isFinished()) {
377 377
             $this->saveFile($save->getFile(), $id);
378 378
 
379 379
             return 'uploaded successfully';
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
         //  Get the current progress
383 383
         $handler = $save->handler();
384 384
 
385
-        Log::debug('File being uploaded.  Percentage done - ' . $handler->getPercentageDone());
385
+        Log::debug('File being uploaded.  Percentage done - '.$handler->getPercentageDone());
386 386
         return response()->json([
387 387
             'done'   => $handler->getPercentageDone(),
388 388
             'status' => true
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
     //  Soft delet the Tech Tip
451 451
     public function destroy($id)
452 452
     {
453
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
453
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
454 454
 
455 455
         $this->authorize('hasAccess', 'Delete Tech Tip');
456 456
 
Please login to merge, or discard this patch.
Braces   +18 added lines, -10 removed lines patch added patch discarded remove patch
@@ -53,14 +53,17 @@  discard block
 block discarded – undo
53 53
         Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
54 54
 
55 55
         //  See if there are any search paramaters entered
56
-        if (!$request->search['searchText'] && !isset($request->search['articleType']) && !isset($request->search['systemType'])) {
56
+        if (!$request->search['searchText'] && !isset($request->search['articleType']) && !isset($request->search['systemType']))
57
+        {
57 58
             //  No search paramaters, send all tech tips
58 59
             $tips = new TechTipsCollection(
59 60
                 TechTips::orderBy('created_at', 'DESC')
60 61
                     ->with('SystemTypes')
61 62
                     ->paginate($request->pagination['perPage'])
62 63
             );
63
-        } else {
64
+        }
65
+        else
66
+        {
64 67
             $article = isset($request->search['articleType']) ? true : false;
65 68
             $system  = isset($request->search['systemType'])  ? true : false;
66 69
             //  Search paramaters, filter results
@@ -151,7 +154,8 @@  discard block
 block discarded – undo
151 154
         $save = $receiver->receive();
152 155
 
153 156
         //  See if the uploade has finished
154
-        if ($save->isFinished()) {
157
+        if ($save->isFinished())
158
+        {
155 159
             $this->saveFile($save->getFile());
156 160
 
157 161
             return 'uploaded successfully';
@@ -252,8 +256,7 @@  discard block
 block discarded – undo
252 256
         if(!$tipData->supressEmail)
253 257
         {
254 258
             $details = TechTips::find($tipID);
255
-            $users = User::whereHas('UserSettings', function($query)
256
-            {
259
+            $users = User::whereHas('UserSettings', function($query) {
257 260
                 $query->where('em_tech_tip', 1);
258 261
             })->get();
259 262
 
@@ -267,7 +270,8 @@  discard block
 block discarded – undo
267 270
     //  Details controller - will move to the show controller with just the tech tip id
268 271
     public function details($id, $subject)
269 272
     {
270
-        if (session()->has('newTipFile')) {
273
+        if (session()->has('newTipFile'))
274
+        {
271 275
             session()->forget('newTipFile');
272 276
         }
273 277
 
@@ -301,7 +305,8 @@  discard block
 block discarded – undo
301 305
     {
302 306
         Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
303 307
 
304
-        switch ($action) {
308
+        switch ($action)
309
+        {
305 310
             case 'add':
306 311
                 TechTipFavs::create([
307 312
                     'user_id' => Auth::user()->user_id,
@@ -330,7 +335,8 @@  discard block
 block discarded – undo
330 335
         $this->authorize('hasAccess', 'Edit Tech Tip');
331 336
         $tipData = TechTips::where('tip_id', $id)->with('User')->with('SystemTypes')->with('TechTipTypes')->first();
332 337
 
333
-        if (!$tipData) {
338
+        if (!$tipData)
339
+        {
334 340
             return view('tips.tipNotFound');
335 341
         }
336 342
 
@@ -363,7 +369,8 @@  discard block
 block discarded – undo
363 369
         $receiver = new FileReceiver('file', $request, HandlerFactory::classFromRequest($request));
364 370
 
365 371
         //  Verify if there is a file to be processed or not
366
-        if ($receiver->isUploaded() === false || $request->_completed) {
372
+        if ($receiver->isUploaded() === false || $request->_completed)
373
+        {
367 374
             $this->storeUpdatedTip($request, $id);
368 375
             Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id);
369 376
             return response()->json(['tip_id' => $id]);
@@ -373,7 +380,8 @@  discard block
 block discarded – undo
373 380
         $save = $receiver->receive();
374 381
 
375 382
         //  See if the uploade has finished
376
-        if ($save->isFinished()) {
383
+        if ($save->isFinished())
384
+        {
377 385
             $this->saveFile($save->getFile(), $id);
378 386
 
379 387
             return 'uploaded successfully';
Please login to merge, or discard this patch.
app/Http/Controllers/Installer/CategoriesController.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     public function __construct()
16 16
     {
17 17
         $this->middleware('auth');
18
-        $this->middleware(function ($request, $next) {
18
+        $this->middleware(function($request, $next) {
19 19
             $this->authorize('hasAccess', 'Manage Equipment');
20 20
             return $next($request);
21 21
         });
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     //  Store the new category form
36 36
     public function store(Request $request)
37 37
     {
38
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
38
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
39 39
 
40 40
         $request->validate([
41 41
             'name' => 'required|string|unique:system_categories|regex:/^[a-zA-Z0-9_ ]*$/'
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     //  Submit the Edit Category form
54 54
     public function update(Request $request, $id)
55 55
     {
56
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
56
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
57 57
 
58 58
         $request->validate([
59 59
             'name' => [
@@ -75,14 +75,14 @@  discard block
 block discarded – undo
75 75
     //  Delete an existing category - note this will fail if the category has systems assigned to it
76 76
     public function destroy($id)
77 77
     {
78
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
78
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
79 79
 
80 80
         try {
81 81
             SystemCategories::find($id)->delete();
82 82
             Log::notice('Category ID '.$id.' deleted by '.Auth::user()->full_name);
83 83
             return response()->json(['success' => true, 'reason' => 'Category Successfully Deleted']);
84 84
         }
85
-        catch (\Illuminate\Database\QueryException $e)
85
+        catch(\Illuminate\Database\QueryException $e)
86 86
         {
87 87
             Log::warning('User '.Auth::user()->full_name.' tried to delete category ID '.$id.' but was unable to since it is still in use.');
88 88
             return response()->json(['success' => false, 'reason' => 'Category still in use.  You must delete all systems attached to this category first.']);
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,8 @@
 block discarded – undo
77 77
     {
78 78
         Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
79 79
 
80
-        try {
80
+        try
81
+        {
81 82
             SystemCategories::find($id)->delete();
82 83
             Log::notice('Category ID '.$id.' deleted by '.Auth::user()->full_name);
83 84
             return response()->json(['success' => true, 'reason' => 'Category Successfully Deleted']);
Please login to merge, or discard this patch.
app/Http/Controllers/Installer/SettingsController.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -26,14 +26,14 @@  discard block
 block discarded – undo
26 26
     //  Bring up the change logo form
27 27
     public function logoSettings()
28 28
     {
29
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
29
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
30 30
 
31 31
         return view('installer.logoSettings');
32 32
     }
33 33
     //  Submit the new company logo
34 34
     public function submitLogo(Request $request)
35 35
     {
36
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
36
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
37 37
 
38 38
         $request->validate([
39 39
             'file' => 'mimes:jpeg,bmp,png,jpg,gif'
@@ -45,17 +45,17 @@  discard block
 block discarded – undo
45 45
 
46 46
         Settings::firstOrCreate(
47 47
             ['key'   => 'app.logo'],
48
-            ['key'   => 'app.logo', 'value' => '/storage/img/' . $fileName]
49
-        )->update(['value' => '/storage/img/' . $fileName]);
48
+            ['key'   => 'app.logo', 'value' => '/storage/img/'.$fileName]
49
+        )->update(['value' => '/storage/img/'.$fileName]);
50 50
 
51
-        Log::notice('A new company logo has been uploaded by ' . Auth::user()->full_name);
51
+        Log::notice('A new company logo has been uploaded by '.Auth::user()->full_name);
52 52
 
53
-        return response()->json(['url' => '/storage/img/' . $fileName]);
53
+        return response()->json(['url' => '/storage/img/'.$fileName]);
54 54
     }
55 55
 
56 56
     public function configuration()
57 57
     {
58
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
58
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
59 59
 
60 60
         $settings = collect([
61 61
             // 'url'      => config('app.url'),
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
     public function submitConfiguration(Request $request)
73 73
     {
74
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
74
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
75 75
 
76 76
         $request->validate([
77 77
             'timezone' => 'required',
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
         ]);
81 81
 
82 82
         //  Update the site timezone
83
-        if (config('app.timezone') !== $request->timezone) {
83
+        if(config('app.timezone') !== $request->timezone) {
84 84
             Settings::firstOrCreate(
85 85
                 ['key'   => 'app.timezone'],
86 86
                 ['key'   => 'app.timezone', 'value' => $request->timezone]
87 87
             )->update(['value' => $request->timezone]);
88 88
         }
89 89
         //  Update the maximum file upload size
90
-        if (config('filesystems.paths.max_size') !== $request->filesize) {
90
+        if(config('filesystems.paths.max_size') !== $request->filesize) {
91 91
             Settings::firstOrCreate(
92 92
                 ['key'   => 'filesystems.paths.max_size'],
93 93
                 ['key'   => 'filesystems.paths.max_size', 'value' => $request->filesize]
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     //  System backups index page
102 102
     public function backupsIndex()
103 103
     {
104
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
104
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
105 105
 
106 106
         return view('installer.backupsIndex');
107 107
     }
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     //  Retrieve the list of backups
110 110
     public function getBackups()
111 111
     {
112
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
112
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
113 113
 
114 114
         $backups = Storage::disk('backup')->files();
115 115
         $buArray = [];
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     //  Delete a backup
134 134
     public function delBackup($name)
135 135
     {
136
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
136
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
137 137
 
138 138
         Storage::disk('backup')->delete($name);
139 139
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     //  Download a backup
145 145
     public function downloadBackup($name)
146 146
     {
147
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
147
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
148 148
 
149 149
         if(Storage::disk('backup')->exists($name))
150 150
         {
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     //  Create a new backup
160 160
     public function runBackup()
161 161
     {
162
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
162
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
163 163
 
164 164
         Artisan::call('tb-backup:run');
165 165
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
     //  Email Settings form
176 176
     public function emailSettings()
177 177
     {
178
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
178
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
179 179
 
180 180
         $settings = collect([
181 181
             'host'       => config('mail.host'),
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
     //  Send a test email
195 195
     public function sendTestEmail(Request $request)
196 196
     {
197
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
197
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
198 198
 
199 199
         //  TODO - fix this and make it work
200 200
         return response()->json(['success' => false]);
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
     //  Submit the test email form
258 258
     public function submitEmailSettings(Request $request)
259 259
     {
260
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
260
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
261 261
 
262 262
         $request->validate([
263 263
             'host'       => 'required',
Please login to merge, or discard this patch.
app/Policies/GatePolicy.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
     //  Determine if a user can see the Administration Nav Link
38 38
     public function seeAdminLink(User $user)
39 39
     {
40
-        if ($this->isInstaller($user))
40
+        if($this->isInstaller($user))
41 41
         {
42 42
             return true;
43 43
         }
44 44
 
45 45
         $data = UserRolePermissions::with('UserRolePermissionTypes')
46
-            ->whereHas('UserRolePermissionTypes', function ($query) {
46
+            ->whereHas('UserRolePermissionTypes', function($query) {
47 47
                 $query->where('description', 'Manage Users')
48 48
                     ->orWhere('description', 'Manage User Roles')
49 49
                     ->orWhere('description', 'Manage Customers')
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             ->get();
55 55
 
56 56
         $allow = $data->isEmpty() ? 'Denied' : 'Allowed';
57
-        Log::debug('User ' . $user->full_name . ' is trying to see admin link.  Result - ' . $allow);
57
+        Log::debug('User '.$user->full_name.' is trying to see admin link.  Result - '.$allow);
58 58
 
59 59
         return  $data->isEmpty() ? false : true;
60 60
     }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         }
70 70
 
71 71
         $data = UserRolePermissions::with('UserRolePermissionTypes')
72
-            ->whereHas('UserRolePermissionTypes', function ($query) use ($task) {
72
+            ->whereHas('UserRolePermissionTypes', function($query) use ($task) {
73 73
                 $query->where('description', $task);
74 74
             })
75 75
             ->where('role_id', $user->role_id)
@@ -77,10 +77,10 @@  discard block
 block discarded – undo
77 77
             ->get();
78 78
 
79 79
         $allow = $data->isEmpty() ? 'false' : 'true';
80
-        Log::debug('User '.$user->full_name.' is trying to access '.$task.'.  Result - ' . $allow);
81
-        if ($allow === 'Denied')
80
+        Log::debug('User '.$user->full_name.' is trying to access '.$task.'.  Result - '.$allow);
81
+        if($allow === 'Denied')
82 82
         {
83
-            Log::alert('User ' . $user->full_name . ' was denied from accessing '.$task.' link.');
83
+            Log::alert('User '.$user->full_name.' was denied from accessing '.$task.' link.');
84 84
         }
85 85
 
86 86
         return  $data->isEmpty() ? false : true;
Please login to merge, or discard this patch.