Passed
Push — master ( d29d54...9a5709 )
by Darko
07:08
created
app/Jobs/RemoveInactiveAccounts.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,15 +30,15 @@
 block discarded – undo
30 30
     {
31 31
         $purgeDays = config('nntmux.purge_inactive_users_days');
32 32
         User::query()->where('roles_id', '=', 1)
33
-            ->where(function ($query) use ($purgeDays) {
33
+            ->where(function($query) use ($purgeDays) {
34 34
                 $query->where('lastlogin', '<', now()->subDays($purgeDays))
35 35
                     ->orWhereNull('lastlogin');
36 36
             })
37
-            ->where(function ($query) use ($purgeDays) {
37
+            ->where(function($query) use ($purgeDays) {
38 38
                 $query->where('apiaccess', '<', now()->subDays($purgeDays))
39 39
                     ->orWhereNull('apiaccess');
40 40
             })
41
-            ->get()->each(function ($user) {
41
+            ->get()->each(function($user) {
42 42
                 $user->delete(); // Use soft delete instead of mass deletion
43 43
             });
44 44
     }
Please login to merge, or discard this patch.
app/Jobs/PurgeDeletedAccounts.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         User::onlyTrashed()
35 35
             ->where('deleted_at', '<', now()->subDays(config('nntmux.purge_inactive_users_days')))
36 36
             ->get()
37
-            ->each(function ($user) {
37
+            ->each(function($user) {
38 38
                 $user->forceDelete(); // Permanently delete the user
39 39
             });
40 40
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/AdminUserController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
         // Add country data to each user based on their host IP
58 58
         foreach ($results as $user) {
59 59
             $position = null;
60
-            if (! empty($user->host) && filter_var($user->host, FILTER_VALIDATE_IP)) {
60
+            if (!empty($user->host) && filter_var($user->host, FILTER_VALIDATE_IP)) {
61 61
                 $position = Location::get($user->host);
62 62
             }
63 63
             $user->country_name = $position ? $position->countryName : null;
Please login to merge, or discard this patch.