Test Failed
Push — dev5 ( d8a4d3...9629db )
by Ron
08:46
created
app/Http/Controllers/Installer/ModuleController.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,8 @@  discard block
 block discarded – undo
41 41
             ];
42 42
         }
43 43
         $mods = Module::allDisabled();
44
-        foreach($mods as $name => $mod) {
44
+        foreach($mods as $name => $mod)
45
+        {
45 46
             $moduleList[] = [
46 47
                 'name' => $name,
47 48
                 'status' => 'Disabled',
@@ -78,7 +79,8 @@  discard block
 block discarded – undo
78 79
         $receiver = new FileReceiver('file', $request, HandlerFactory::classFromRequest($request));
79 80
 
80 81
         //  Verify that the upload is valid and being processed
81
-        if($receiver->isUploaded() === false) {
82
+        if($receiver->isUploaded() === false)
83
+        {
82 84
             Log::error('Upload File Missing - '.
83 85
                 /** @scrutinizer ignore-type */
84 86
                 $request->toArray());
@@ -89,7 +91,8 @@  discard block
 block discarded – undo
89 91
         $save = $receiver->receive();
90 92
 
91 93
         //  See if the uploade has finished
92
-        if($save->isFinished()) {
94
+        if($save->isFinished())
95
+        {
93 96
             $this->saveFile($save->getFile());
94 97
 
95 98
             return 'uploaded successfully';
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/Http/Controllers/Installer/SystemsController.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -211,7 +211,8 @@
 block discarded – undo
211 211
     public function destroy($id)
212 212
     {
213 213
         //
214
-        try {
214
+        try
215
+        {
215 216
             SystemTypes::find($id)->delete();
216 217
             return response()->json(['success' => true, 'reason' => 'Equipment Successfully Deleted']);
217 218
         }
Please login to merge, or discard this patch.
app/Http/Controllers/DownloadController.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,9 +59,12 @@  discard block
 block discarded – undo
59 59
     public function archiveFiles(Request $request)
60 60
     {
61 61
         //  Debug Data
62
-        if(Auth::user()) {
62
+        if(Auth::user())
63
+        {
63 64
             $user = Auth::user()->full_name;
64
-        } else {
65
+        }
66
+        else
67
+        {
65 68
             $user = \Request::ip();
66 69
         }
67 70
         Log::debug('Route '.Route::currentRouteName().' visited by '.$user.'  Request Data:', $request->toArray());
@@ -107,9 +110,12 @@  discard block
 block discarded – undo
107 110
     public function downloadArchive($fileName)
108 111
     {
109 112
         //  Debug Data
110
-        if(Auth::user()) {
113
+        if(Auth::user())
114
+        {
111 115
             $user = Auth::user()->full_name;
112
-        } else {
116
+        }
117
+        else
118
+        {
113 119
             $user = \Request::ip();
114 120
         }
115 121
         Log::debug('Route '.Route::currentRouteName().' visited by '.$user);
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/AdminController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         Log::notice('User '.Auth::user()->full_name.' updated User Password Policy');
90 90
 
91 91
         //  If the setting is changing from never to xx days, update all users
92
-        if ($request->passExpire == 0)
92
+        if($request->passExpire == 0)
93 93
         {
94 94
             User::whereNotNull('password_expires')->update([
95 95
                 'password_expires' => null
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     public function roleSettings()
111 111
     {
112 112
         $this->authorize('hasAccess', 'Manage User Roles');
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
         $roles = UserRoleType::with(['UserRolePermissions' => function($query) {
115 115
             $query->join('user_role_permission_types', 'user_role_permission_types.perm_type_id', '=', 'user_role_permissions.perm_type_id');
116 116
         }])->get();
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/UserController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -182,13 +182,13 @@  discard block
 block discarded – undo
182 182
 
183 183
         //  Good to go - get role information
184 184
         $roleArr = [];
185
-        foreach ($roles as $role)
185
+        foreach($roles as $role)
186 186
         {
187
-            if ($role->role_id == 1 && Auth::user()->role_id != 1)
187
+            if($role->role_id == 1 && Auth::user()->role_id != 1)
188 188
             {
189 189
                 continue;
190 190
             }
191
-            else if ($role->role_id == 2 && Auth::user()->role_id > 1)
191
+            else if($role->role_id == 2 && Auth::user()->role_id > 1)
192 192
             {
193 193
                 continue;
194 194
             }
@@ -285,13 +285,13 @@  discard block
 block discarded – undo
285 285
         $user = User::find($request->user_id);
286 286
 
287 287
         //  Verify this is a valid user ID
288
-        if (!$user)
288
+        if(!$user)
289 289
         {
290 290
             $success = false;
291 291
             $reason  = 'Cannot find user with this ID';
292 292
         }
293 293
         //  Make sure that the user is not trying to deactivate someone with more permissions
294
-        else if ($user->role_id < Auth::user()->role_id)
294
+        else if($user->role_id < Auth::user()->role_id)
295 295
         {
296 296
             $success = false;
297 297
             $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.';
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/DashboardController.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,16 +22,16 @@  discard block
 block discarded – undo
22 22
     //  Dashboard is the Logged In User home landing page
23 23
     public function index()
24 24
     {
25
-        Log::debug('Route "' . Route::currentRouteName() . '" visited by ' . Auth::user()->full_name);
25
+        Log::debug('Route "'.Route::currentRouteName().'" visited by '.Auth::user()->full_name);
26 26
 
27 27
         //  Get Dashboard data
28
-        $custFavs    = CustomerFavs::where('user_id', Auth::user()->user_id)
29
-            ->with(array('Customers' => function($query){
28
+        $custFavs = CustomerFavs::where('user_id', Auth::user()->user_id)
29
+            ->with(array('Customers' => function($query) {
30 30
                 $query->select('cust_id', 'name');
31 31
             }))
32 32
             ->get();
33
-        $tipFavs     = TechTipFavs::where('user_id', Auth::user()->user_id)
34
-            ->with(array('TechTips' => function($query){
33
+        $tipFavs = TechTipFavs::where('user_id', Auth::user()->user_id)
34
+            ->with(array('TechTips' => function($query) {
35 35
                 $query->select('tip_id', 'subject');
36 36
             }))
37 37
             ->get();
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     //  Mark a notification as read
68 68
     public function markNotification($id)
69 69
     {
70
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
70
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
71 71
 
72 72
         $notification = Auth::user()->notifications()->where('id', $id)->where('notifiable_id', Auth::user()->user_id)->first();
73 73
         if(!$notification)
@@ -85,12 +85,12 @@  discard block
 block discarded – undo
85 85
     //  Delte a user notification
86 86
     public function delNotification($id)
87 87
     {
88
-        Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
88
+        Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name);
89 89
 
90 90
         $notification = Auth::user()->notifications()->where('id', $id)->where('notifiable_id', Auth::user()->user_id)->first();
91 91
         if(!$notification)
92 92
         {
93
-            Log::error('User ' . Auth::user()->full_name . ' tried to delete an invalid notification.  Notification ID: ' . $id);
93
+            Log::error('User '.Auth::user()->full_name.' tried to delete an invalid notification.  Notification ID: '.$id);
94 94
             return abort(404);
95 95
         }
96 96
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@
 block discarded – undo
26 26
 
27 27
         //  Get Dashboard data
28 28
         $custFavs    = CustomerFavs::where('user_id', Auth::user()->user_id)
29
-            ->with(array('Customers' => function($query){
29
+            ->with(array('Customers' => function($query) {
30 30
                 $query->select('cust_id', 'name');
31 31
             }))
32 32
             ->get();
33 33
         $tipFavs     = TechTipFavs::where('user_id', Auth::user()->user_id)
34
-            ->with(array('TechTips' => function($query){
34
+            ->with(array('TechTips' => function($query) {
35 35
                 $query->select('tip_id', 'subject');
36 36
             }))
37 37
             ->get();
Please login to merge, or discard this patch.