Passed
Push — master ( 054b32...1c77af )
by Ron
07:39 queued 12s
created
app/Http/Controllers/DashboardController.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,12 +34,12 @@
 block discarded – undo
34 34
         $totalLinks  = FileLinks::where('user_id', Auth::user()->user_id)->count();
35 35
 
36 36
         return view('dashboard', [
37
-           'custFavs'    => $custFavs,
38
-           'tipFavs'     => $tipFavs,
39
-           'tips30'      => $tips30Days,
40
-           'tipsAll'     => $tipsTotal,
41
-           'activeLinks' => $activeLinks,
42
-           'totalLinks'  => $totalLinks,
37
+            'custFavs'    => $custFavs,
38
+            'tipFavs'     => $tipFavs,
39
+            'tips30'      => $tips30Days,
40
+            'tipsAll'     => $tipsTotal,
41
+            'activeLinks' => $activeLinks,
42
+            'totalLinks'  => $totalLinks,
43 43
         ]);
44 44
     }
45 45
 
Please login to merge, or discard this patch.
app/Http/Middleware/CheckBrowser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         if(!empty($_SERVER['HTTP_USER_AGENT']))
20 20
         {
21 21
             //  Check for Internet Explorer 11
22
-            if (preg_match("/Trident\/7.0;(.*)rv:11.0/", $_SERVER["HTTP_USER_AGENT"], $match) != 0)
22
+            if(preg_match("/Trident\/7.0;(.*)rv:11.0/", $_SERVER["HTTP_USER_AGENT"], $match) != 0)
23 23
             {
24 24
                 return response()->make(view('error.426'), 426);
25 25
             }
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/UserController.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     public function __construct()
30 30
     {
31 31
         $this->middleware('auth')->except('initializeUser', 'submitInitializeUser');
32
-        $this->middleware(function ($request, $next) {
32
+        $this->middleware(function($request, $next) {
33 33
             $this->authorize('hasAccess', 'Manage Users');
34 34
             return $next($request);
35 35
         });
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     //  List all inactive users
145 145
     public function show($type)
146 146
     {
147
-        $route    = '';
147
+        $route = '';
148 148
 
149 149
         if($type !== 'inactive')
150 150
         {
@@ -168,17 +168,17 @@  discard block
 block discarded – undo
168 168
         $user  = new UserResource(User::findOrFail($id));
169 169
 
170 170
         //  Make sure that the user is not trying to deactivate someone with more permissions
171
-        if ($user->role_id < Auth::user()->role_id)
171
+        if($user->role_id < Auth::user()->role_id)
172 172
         {
173 173
             return abort(403);
174 174
         }
175 175
 
176 176
         //  Good to go - update user password
177 177
         $roleArr = [];
178
-        foreach ($roles as $role) {
179
-            if ($role->role_id == 1 && Auth::user()->role_id != 1) {
178
+        foreach($roles as $role) {
179
+            if($role->role_id == 1 && Auth::user()->role_id != 1) {
180 180
                 continue;
181
-            } else if ($role->role_id == 2 && Auth::user()->role_id > 1) {
181
+            } else if($role->role_id == 2 && Auth::user()->role_id > 1) {
182 182
                 continue;
183 183
             } else {
184 184
                 // $roleArr[$role->role_id] = $role->name;
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
             }
190 190
         }
191 191
 
192
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id);
192
+        Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id);
193 193
         return view('admin.userEdit', [
194 194
             'roles' => $roleArr,
195 195
             'user'  => $user->
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
         //  Update the user data
229 229
         $user = User::findOrFail($id);
230 230
 
231
-        if ($user->role_id < Auth::user()->role_id)
231
+        if($user->role_id < Auth::user()->role_id)
232 232
         {
233 233
             return abort(403);
234 234
         }
@@ -271,12 +271,12 @@  discard block
 block discarded – undo
271 271
         $user = User::find($request->user_id);
272 272
 
273 273
         //  Verify this is a valid user ID
274
-        if (!$user) {
274
+        if(!$user) {
275 275
             $success = false;
276 276
             $reason  = 'Cannot find user with this ID';
277 277
         }
278 278
         //  Make sure that the user is not trying to deactivate someone with more permissions
279
-        else if ($user->role_id < Auth::user()->role_id) {
279
+        else if($user->role_id < Auth::user()->role_id) {
280 280
             $success = false;
281 281
             $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.';
282 282
         }
@@ -289,11 +289,11 @@  discard block
 block discarded – undo
289 289
                 'password_expires' => $nextChange
290 290
             ]);
291 291
             $success = true;
292
-            $reason  = 'Password for ' . $user->full_name . ' successfully reset.';
292
+            $reason  = 'Password for '.$user->full_name.' successfully reset.';
293 293
         }
294 294
 
295
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id);
296
-        Log::notice('User ID-' . $request->user_id . ' password chagned by ' . Auth::user()->user_id, [
295
+        Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id);
296
+        Log::notice('User ID-'.$request->user_id.' password chagned by '.Auth::user()->user_id, [
297 297
             'success' => $success,
298 298
             'reason'  => $reason,
299 299
         ]);
Please login to merge, or discard this patch.
app/Http/Controllers/Installer/SettingsController.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -41,14 +41,14 @@  discard block
 block discarded – undo
41 41
 
42 42
         Settings::firstOrCreate(
43 43
             ['key'   => 'app.logo'],
44
-            ['key'   => 'app.logo', 'value' => '/storage/img/' . $fileName]
45
-        )->update(['value' => '/storage/img/' . $fileName]);
44
+            ['key'   => 'app.logo', 'value' => '/storage/img/'.$fileName]
45
+        )->update(['value' => '/storage/img/'.$fileName]);
46 46
 
47
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id);
47
+        Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id);
48 48
         Log::debug('Submitted Data - ', $request->toArray());
49
-        Log::notice('A new company logo has been uploaded by User ID-' . Auth::user()->user_id);
49
+        Log::notice('A new company logo has been uploaded by User ID-'.Auth::user()->user_id);
50 50
 
51
-        return response()->json(['url' => '/storage/img/' . $fileName]);
51
+        return response()->json(['url' => '/storage/img/'.$fileName]);
52 52
     }
53 53
 
54 54
     public function configuration()
@@ -74,14 +74,14 @@  discard block
 block discarded – undo
74 74
         ]);
75 75
 
76 76
         //  Update the site timezone
77
-        if (config('app.timezone') !== $request->timezone) {
77
+        if(config('app.timezone') !== $request->timezone) {
78 78
             Settings::firstOrCreate(
79 79
                 ['key'   => 'app.timezone'],
80 80
                 ['key'   => 'app.timezone', 'value' => $request->timezone]
81 81
             )->update(['value' => $request->timezone]);
82 82
         }
83 83
         //  Update the maximum file upload size
84
-        if (config('filesystems.paths.max_size') !== $request->filesize) {
84
+        if(config('filesystems.paths.max_size') !== $request->filesize) {
85 85
             Settings::firstOrCreate(
86 86
                 ['key'   => 'filesystems.paths.max_size'],
87 87
                 ['key'   => 'filesystems.paths.max_size', 'value' => $request->filesize]
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,14 +74,16 @@
 block discarded – undo
74 74
         ]);
75 75
 
76 76
         //  Update the site timezone
77
-        if (config('app.timezone') !== $request->timezone) {
77
+        if (config('app.timezone') !== $request->timezone)
78
+        {
78 79
             Settings::firstOrCreate(
79 80
                 ['key'   => 'app.timezone'],
80 81
                 ['key'   => 'app.timezone', 'value' => $request->timezone]
81 82
             )->update(['value' => $request->timezone]);
82 83
         }
83 84
         //  Update the maximum file upload size
84
-        if (config('filesystems.paths.max_size') !== $request->filesize) {
85
+        if (config('filesystems.paths.max_size') !== $request->filesize)
86
+        {
85 87
             Settings::firstOrCreate(
86 88
                 ['key'   => 'filesystems.paths.max_size'],
87 89
                 ['key'   => 'filesystems.paths.max_size', 'value' => $request->filesize]
Please login to merge, or discard this patch.
app/TechTipComments.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
         'created_at' => 'datetime:M d, Y',
13 13
         'updated_at' => 'datetime:M d, Y',
14 14
     ];
15
-    protected $hidden = [ 'user_id' ];
15
+    protected $hidden = ['user_id'];
16 16
 
17 17
     public function User()
18 18
     {
Please login to merge, or discard this patch.
config/filesystems.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,13 +33,13 @@
 block discarded – undo
33 33
     ],
34 34
     'paths' => [
35 35
         'default'    => env('DFLT_FOLDER', DIRECTORY_SEPARATOR.'default'),
36
-        'systems'    => env('SYS_FOLDER',  DIRECTORY_SEPARATOR.'systems'),
36
+        'systems'    => env('SYS_FOLDER', DIRECTORY_SEPARATOR.'systems'),
37 37
         'customers'  => env('CUST_FOLDER', DIRECTORY_SEPARATOR.'customers'),
38 38
         'users'      => env('USER_FOLDER', DIRECTORY_SEPARATOR.'users'),
39
-        'tips'       => env('TIP_FOLDER',  DIRECTORY_SEPARATOR.'tips'),
39
+        'tips'       => env('TIP_FOLDER', DIRECTORY_SEPARATOR.'tips'),
40 40
         'links'      => env('LINK_FOLDER', DIRECTORY_SEPARATOR.'links'),
41 41
         'company'    => env('COMP_FOLDER', DIRECTORY_SEPARATOR.'company'),
42
-        'max_size'   => env('MAX_UPLOAD',  1600),    //  Megabytes = Default = 1600 - 2GB
43
-        'chunk_size' => env('CHUNK_SIZE',  500000), //  Bytes = Default = 500000 = 0.5Mb
42
+        'max_size'   => env('MAX_UPLOAD', 1600), //  Megabytes = Default = 1600 - 2GB
43
+        'chunk_size' => env('CHUNK_SIZE', 500000), //  Bytes = Default = 500000 = 0.5Mb
44 44
     ],
45 45
 ];
Please login to merge, or discard this patch.
app/Http/Controllers/Customers/CustomerContactsController.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
         //  Determine if there is a parent site with shared contacts
72 72
         $parent = Customers::find($id)->parent_id;
73
-        if ($parent)
73
+        if($parent)
74 74
         {
75 75
             $parentList = CustomerContacts::where('cust_id', $parent)
76 76
                 ->where('shared', 1)
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
         //  Update the primary contact information
130 130
         $details = Customers::find($request->cust_id);
131
-        if ($details->parent_id && $request->shared == 'true') {
131
+        if($details->parent_id && $request->shared == 'true') {
132 132
             $request->cust_id = $details->parent_id;
133 133
         }
134 134
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,8 @@
 block discarded – undo
128 128
 
129 129
         //  Update the primary contact information
130 130
         $details = Customers::find($request->cust_id);
131
-        if ($details->parent_id && $request->shared == 'true') {
131
+        if ($details->parent_id && $request->shared == 'true')
132
+        {
132 133
             $request->cust_id = $details->parent_id;
133 134
         }
134 135
 
Please login to merge, or discard this patch.
app/Http/Controllers/Customers/CustomerNotesController.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
         //  Determine if the note should go to the customer, or its parent
31 31
         $details = Customers::find($request->cust_id);
32
-        if ($details->parent_id && $request->shared == 'true') {
32
+        if($details->parent_id && $request->shared == 'true') {
33 33
             $request->cust_id = $details->parent_id;
34 34
         }
35 35
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
         //  Determine if there is a parent site with shared contacts
57 57
         $parent = Customers::find($id)->parent_id;
58
-        if ($parent) {
58
+        if($parent) {
59 59
             $parentList = CustomerNotes::where('cust_id', $parent)->where('shared', 1)->orderBy('urgent', 'desc')->get();
60 60
 
61 61
             $notes = $notes->merge($parentList);
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         ]);
77 77
 
78 78
         $details = Customers::find($request->cust_id);
79
-        if ($details->parent_id && $request->shared == 'true') {
79
+        if($details->parent_id && $request->shared == 'true') {
80 80
             $request->cust_id = $details->parent_id;
81 81
         }
82 82
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,8 @@  discard block
 block discarded – undo
29 29
 
30 30
         //  Determine if the note should go to the customer, or its parent
31 31
         $details = Customers::find($request->cust_id);
32
-        if ($details->parent_id && $request->shared == 'true') {
32
+        if ($details->parent_id && $request->shared == 'true')
33
+        {
33 34
             $request->cust_id = $details->parent_id;
34 35
         }
35 36
 
@@ -55,7 +56,8 @@  discard block
 block discarded – undo
55 56
 
56 57
         //  Determine if there is a parent site with shared contacts
57 58
         $parent = Customers::find($id)->parent_id;
58
-        if ($parent) {
59
+        if ($parent)
60
+        {
59 61
             $parentList = CustomerNotes::where('cust_id', $parent)->where('shared', 1)->orderBy('urgent', 'desc')->get();
60 62
 
61 63
             $notes = $notes->merge($parentList);
@@ -76,7 +78,8 @@  discard block
 block discarded – undo
76 78
         ]);
77 79
 
78 80
         $details = Customers::find($request->cust_id);
79
-        if ($details->parent_id && $request->shared == 'true') {
81
+        if ($details->parent_id && $request->shared == 'true')
82
+        {
80 83
             $request->cust_id = $details->parent_id;
81 84
         }
82 85
 
Please login to merge, or discard this patch.
app/Http/Controllers/Customers/CustomerFilesController.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         //  Verify that the upload is valid and being processed
38 38
         if($receiver->isUploaded() === false)
39 39
         {
40
-            Log::error('Upload File Missing - ' .
40
+            Log::error('Upload File Missing - '.
41 41
             /** @scrutinizer ignore-type */
42 42
             $request->toArray());
43 43
             throw new UploadMissingFileException();
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         {
52 52
             //  Determine if the note should go to the customer, or its parent
53 53
             $details = Customers::find($request->cust_id);
54
-            if ($details->parent_id && $request->shared == 'true')
54
+            if($details->parent_id && $request->shared == 'true')
55 55
             {
56 56
                 $request->cust_id = $details->parent_id;
57 57
             }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
         //  Determine if there is a parent site with shared files
113 113
         $parent = Customers::find($id)->parent_id;
114
-        if ($parent) {
114
+        if($parent) {
115 115
             $parentList = Customerfiles::where('cust_id', $parent)
116 116
                 ->where('shared', 1)
117 117
                 ->with('Files')
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         ]);
136 136
 
137 137
         $details = Customers::find($request->cust_id);
138
-        if ($details->parent_id && $request->shared == 1) {
138
+        if($details->parent_id && $request->shared == 1) {
139 139
             $request->cust_id = $details->parent_id;
140 140
         }
141 141
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,7 +111,8 @@  discard block
 block discarded – undo
111 111
 
112 112
         //  Determine if there is a parent site with shared files
113 113
         $parent = Customers::find($id)->parent_id;
114
-        if ($parent) {
114
+        if ($parent)
115
+        {
115 116
             $parentList = Customerfiles::where('cust_id', $parent)
116 117
                 ->where('shared', 1)
117 118
                 ->with('Files')
@@ -135,7 +136,8 @@  discard block
 block discarded – undo
135 136
         ]);
136 137
 
137 138
         $details = Customers::find($request->cust_id);
138
-        if ($details->parent_id && $request->shared == 1) {
139
+        if ($details->parent_id && $request->shared == 1)
140
+        {
139 141
             $request->cust_id = $details->parent_id;
140 142
         }
141 143
 
Please login to merge, or discard this patch.