Passed
Push — master ( bd13ba...272332 )
by Sander
04:42 queued 02:26
created
src/Console/Commands/Cleanup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 
44 44
         $users = User::all();
45 45
 
46
-        $strategy = app($config['cleanup']['strategy']);
46
+        $strategy = app($config[ 'cleanup' ][ 'strategy' ]);
47 47
 
48 48
         CleanupJob::dispatch($users, $strategy);
49 49
 
Please login to merge, or discard this patch.
src/Jobs/Cleanup/Strategies/DefaultStrategy.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@  discard block
 block discarded – undo
23 23
 
24 24
         // Users are considered inactive if their last activity is older than this timestamp
25 25
         $inactivity = Carbon::now()
26
-            ->subMonths($config['keepInactiveUsersForMonths']);
26
+            ->subMonths($config[ 'keepInactiveUsersForMonths' ]);
27 27
 
28 28
         $this->notifyInactiveUsers(
29 29
             $inactivity,
30
-            $config['notifyUsersDaysBeforeDeletion'],
30
+            $config[ 'notifyUsersDaysBeforeDeletion' ],
31 31
             $users
32 32
         );
33 33
 
@@ -48,11 +48,11 @@  discard block
 block discarded – undo
48 48
         Collection $users
49 49
     ) {
50 50
         $users->filter(
51
-            function (User $user) use ($inactivity, $notificationThreshold) {
51
+            function(User $user) use ($inactivity, $notificationThreshold) {
52 52
                 return $user->last_activity->diffInDays($inactivity)
53 53
                     === $notificationThreshold;
54 54
             }
55
-        )->each(function (User $user) {
55
+        )->each(function(User $user) {
56 56
             event(new GdprInactiveUser($user));
57 57
         });
58 58
     }
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
         Carbon $inactivity,
69 69
         Collection $users
70 70
     ) {
71
-        $users->filter(function (User $user) use ($inactivity) {
71
+        $users->filter(function(User $user) use ($inactivity) {
72 72
             return $user->last_activity < $inactivity;
73
-        })->each(function (User $user) {
73
+        })->each(function(User $user) {
74 74
             $user->delete();
75 75
 
76 76
             event(new GdprInactiveUserDeleted($user));
Please login to merge, or discard this patch.