Passed
Push — dev5 ( 9ca56e...5adb95 )
by Ron
08:24
created
app/Providers/FormGroupServiceProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,14 +25,14 @@
 block discarded – undo
25 25
     public function boot()
26 26
     {
27 27
         //  Service provider to customize form inputs
28
-        Form::component('bsText',     'components.form.text',     ['name', 'label', 'value' => null, 'attributes' => []]);
28
+        Form::component('bsText', 'components.form.text', ['name', 'label', 'value' => null, 'attributes' => []]);
29 29
         Form::component('bsPassword', 'components.form.password', ['name', 'label', 'value' => null, 'attributes' => []]);
30
-        Form::component('bsNumber',   'components.form.number',   ['name', 'label', 'value' => null, 'attributes' => []]);
31
-        Form::component('bsEmail',    'components.form.email',    ['name', 'label', 'value' => null, 'attributes' => []]);
32
-        Form::component('bsDate',     'components.form.date',     ['name', 'label', 'value' => null, 'attributes' => []]);
30
+        Form::component('bsNumber', 'components.form.number', ['name', 'label', 'value' => null, 'attributes' => []]);
31
+        Form::component('bsEmail', 'components.form.email', ['name', 'label', 'value' => null, 'attributes' => []]);
32
+        Form::component('bsDate', 'components.form.date', ['name', 'label', 'value' => null, 'attributes' => []]);
33 33
         Form::component('bsTextarea', 'components.form.textarea', ['name', 'label', 'value' => null, 'attributes' => []]);
34 34
         Form::component('bsCheckbox', 'components.form.checkbox', ['name', 'label', 'value' => 'on', 'checked' => false, 'attributes' => []]);
35
-        Form::component('bsSelect',   'components.form.select',   ['name', 'label', 'list', 'selected' => null, 'attributes' => []]);
35
+        Form::component('bsSelect', 'components.form.select', ['name', 'label', 'list', 'selected' => null, 'attributes' => []]);
36 36
         //  Custom Submit button
37 37
         Form::component('bsSubmit', 'components.form.submit', ['name']);
38 38
         //  List of all states in a dropdown box
Please login to merge, or discard this patch.
app/Http/Controllers/Customers/CustomerSystemsController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     //  Get the possible system types that can be assigned to the customer
25 25
     public function index()
26 26
     {
27
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
27
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
28 28
         $sysList = new CategoriesCollection(SystemCategories::with('SystemTypes')->with('SystemTypes.SystemDataFields.SystemDataFieldTypes')->get());
29 29
 
30 30
         return $sysList;
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     //  Store a new system for the customer
34 34
     public function store(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
             'cust_id' => 'required',
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     //  Get the list of systems attached to the customer
77 77
     public function show($id)
78 78
     {
79
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
79
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
80 80
 
81 81
         $sysList = CustomerSystems::where('cust_id', $id)
82 82
                     ->with('SystemTypes')
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     // Update the customers system data
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
             'cust_id'    => 'required',
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
         foreach($fields as $data)
126 126
         {
127
-            $fieldName = 'field_' . $data->field_id;
127
+            $fieldName = 'field_'.$data->field_id;
128 128
             if(isset($request->$fieldName))
129 129
             {
130 130
                 Log::debug($request->$fieldName);
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     //  Delete a system attached to a customer
143 143
     public function destroy($id)
144 144
     {
145
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
145
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
146 146
 
147 147
         // return response('deleted '.$id);
148 148
         $system = CustomerSystems::find($id);
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.
app/Http/Controllers/Customers/CustomerContactsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@
 block discarded – undo
130 130
 
131 131
         //  Update the primary contact information
132 132
         $details = Customers::find($request->cust_id);
133
-        if ($details->parent_id && $request->shared == 'true')
133
+        if($details->parent_id && $request->shared == 'true')
134 134
         {
135 135
             $request->cust_id = $details->parent_id;
136 136
         }
Please login to merge, or discard this patch.
app/Http/Controllers/Customers/CustomerNotesController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
         //  Determine if the note should go to the customer, or its parent
33 33
         $details = Customers::find($request->cust_id);
34
-        if ($details->parent_id && $request->shared == 'true')
34
+        if($details->parent_id && $request->shared == 'true')
35 35
         {
36 36
             $request->cust_id = $details->parent_id;
37 37
         }
@@ -56,21 +56,21 @@  discard block
 block discarded – undo
56 56
 
57 57
         //  Determine if there is a parent site with shared notes
58 58
         $parent = Customers::find($id)->parent_id;
59
-        if ($parent)
59
+        if($parent)
60 60
         {
61 61
             $parentList = CustomerNotes::where('cust_id', $parent)->where('shared', 1)->orderBy('urgent', 'desc')->get();
62 62
 
63 63
             $notes = $notes->merge($parentList);
64 64
         }
65 65
 
66
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
66
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
67 67
         return $notes;
68 68
     }
69 69
 
70 70
     //  Update a customer note
71 71
     public function update(Request $request, $id)
72 72
     {
73
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
73
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
74 74
 
75 75
         $request->validate([
76 76
             'cust_id' => 'required',
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         ]);
80 80
 
81 81
         $details = Customers::find($request->cust_id);
82
-        if ($details->parent_id && $request->shared == 'true')
82
+        if($details->parent_id && $request->shared == 'true')
83 83
         {
84 84
             $request->cust_id = $details->parent_id;
85 85
         }
Please login to merge, or discard this patch.
app/Http/Controllers/Installer/SettingsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  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
         {
85 85
             Settings::firstOrCreate(
86 86
                 ['key'   => 'app.timezone'],
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             )->update(['value' => $request->timezone]);
89 89
         }
90 90
         //  Update the maximum file upload size
91
-        if (config('filesystems.paths.max_size') !== $request->filesize)
91
+        if(config('filesystems.paths.max_size') !== $request->filesize)
92 92
         {
93 93
             Settings::firstOrCreate(
94 94
                 ['key'   => 'filesystems.paths.max_size'],
Please login to merge, or discard this patch.
app/Files.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
         Log::debug('Preparing to clean a file. Current Name - '.$fileName.'. Current Path - '.$path);
20 20
         //  Remove all spaces
21 21
         $fileName = str_replace(' ', '_', $fileName);
22
-        Log::debug('Cleaned Filename. Current Name - ' . $fileName . '. Current Path - ' . $path);
22
+        Log::debug('Cleaned Filename. Current Name - '.$fileName.'. Current Path - '.$path);
23 23
 
24 24
         //  Determine if the filename already exists
25 25
         if(Storage::exists($path.DIRECTORY_SEPARATOR.$fileName))
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             //  Increase the number until one that is not in use is found
45 45
             do
46 46
             {
47
-                Log::debug('Filename ' . $fileName . ' already exists.  Appending name.');
47
+                Log::debug('Filename '.$fileName.' already exists.  Appending name.');
48 48
                 $fileName = $base.'('.++$number.')'.$extension;
49 49
             } while(Storage::exists($path.DIRECTORY_SEPARATOR.$fileName));
50 50
         }
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/AdminController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     //  Display all file links
35 35
     public function userLinks()
36 36
     {
37
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
37
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
38 38
 
39 39
         $userLinks = new UserCollection(
40 40
             User::withCount([
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         Log::notice('User '.Auth::user()->full_name.' updated User Password Policy requiring resets every '.$request->passExpire.' days');
95 95
 
96 96
         //  If the setting is changing from never to xx days, update all users
97
-        if ($request->passExpire == 0)
97
+        if($request->passExpire == 0)
98 98
         {
99 99
             User::whereNotNull('password_expires')->update([
100 100
                 'password_expires' => null
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     //  View the current roles that can be assigned to users
117 117
     public function roleSettings()
118 118
     {
119
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
119
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
120 120
         $this->authorize('hasAccess', 'Manage User Roles');
121 121
 
122 122
         $roles = UserRoleType::with(['UserRolePermissions' => function($query) {
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/UserController.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     //  Show the list of current users to edit
35 35
     public function index()
36 36
     {
37
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
37
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
38 38
 
39 39
         $userList = User::with('LastUserLogin')->get()->makeVisible('user_id');
40 40
         $route    = 'admin.user.edit';
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     //  Show the Add User form
72 72
     public function create()
73 73
     {
74
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
74
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
75 75
 
76 76
         $roles = UserRoleType::all();
77 77
         $roleArr = [];
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
     //  List all inactive users
155 155
     public function show($type)
156 156
     {
157
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
157
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
158 158
         $route = '';
159 159
 
160 160
         if($type !== 'inactive')
@@ -177,10 +177,10 @@  discard block
 block discarded – undo
177 177
     //  Reactivate a disabled user
178 178
     public function reactivateUser($id)
179 179
     {
180
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
180
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
181 181
         User::withTrashed()->where('user_id', $id)->restore();
182 182
 
183
-        Log::notice('User ID ' . $id . ' reactivated by ' . Auth::user()->full_name);
183
+        Log::notice('User ID '.$id.' reactivated by '.Auth::user()->full_name);
184 184
         return response()->json([
185 185
             'success' => true,
186 186
         ]);
@@ -189,13 +189,13 @@  discard block
 block discarded – undo
189 189
     //  Open the edit user form
190 190
     public function edit($id)
191 191
     {
192
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
192
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
193 193
 
194 194
         $roles = UserRoleType::all();
195 195
         $user  = new UserResource(User::findOrFail($id));
196 196
 
197 197
         //  Make sure that the user is not trying to edit someone with more permissions
198
-        if(($user->role_id == 1 || $user->role_id == 2) && Auth::user()->role_id <=2)
198
+        if(($user->role_id == 1 || $user->role_id == 2) && Auth::user()->role_id <= 2)
199 199
         {
200 200
             Log::warning('User '.Auth::user()->full_name.' tried to update user ID '.$id.' that has more permissions than they do.  This request was denied.');
201 201
             return abort(403);
@@ -205,13 +205,13 @@  discard block
 block discarded – undo
205 205
 
206 206
         //  Good to go - get role information
207 207
         $roleArr = [];
208
-        foreach ($roles as $role)
208
+        foreach($roles as $role)
209 209
         {
210
-            if ($role->role_id == 1 && Auth::user()->role_id != 1)
210
+            if($role->role_id == 1 && Auth::user()->role_id != 1)
211 211
             {
212 212
                 continue;
213 213
             }
214
-            else if ($role->role_id == 2 && Auth::user()->role_id > 2)
214
+            else if($role->role_id == 2 && Auth::user()->role_id > 2)
215 215
             {
216 216
                 continue;
217 217
             }
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
         $user = User::findOrFail($id);
258 258
         if($user->role_id < Auth::user()->role_id)
259 259
         {
260
-            Log::warning('User ' . Auth::user()->full_name . ' tried to update user ID ' . $id . ' that has more permissions than they do.  This request was denied.');
260
+            Log::warning('User '.Auth::user()->full_name.' tried to update user ID '.$id.' that has more permissions than they do.  This request was denied.');
261 261
             return abort(403);
262 262
         }
263 263
 
@@ -297,13 +297,13 @@  discard block
 block discarded – undo
297 297
         $user = User::find($request->user_id);
298 298
 
299 299
         //  Verify this is a valid user ID
300
-        if (!$user)
300
+        if(!$user)
301 301
         {
302 302
             $success = false;
303 303
             $reason  = 'Cannot find user with this ID';
304 304
         }
305 305
         //  Make sure that the user is not trying to deactivate someone with more permissions
306
-        else if ($user->role_id < Auth::user()->role_id)
306
+        else if($user->role_id < Auth::user()->role_id)
307 307
         {
308 308
             $success = false;
309 309
             $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.';
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
     //  Disable the user
336 336
     public function destroy($id)
337 337
     {
338
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
338
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
339 339
 
340 340
         $user = User::find($id);
341 341
 
Please login to merge, or discard this patch.