@@ -28,7 +28,7 @@ |
||
28 | 28 | 'prefix' => config('gdpr.uri'), |
29 | 29 | 'namespace' => 'Soved\Laravel\Gdpr\Http\Controllers', |
30 | 30 | 'middleware' => config('gdpr.middleware'), |
31 | - ], function () { |
|
31 | + ], function() { |
|
32 | 32 | $this->loadRoutesFrom(__DIR__ . '/../routes/web.php'); |
33 | 33 | }); |
34 | 34 | } |
@@ -43,7 +43,7 @@ |
||
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 |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | { |
42 | 42 | $portableRelations = $this->getPortableRelations($relations); |
43 | 43 | |
44 | - array_walk($portableRelations, [$this, 'loadPortableRelation']); |
|
44 | + array_walk($portableRelations, [ $this, 'loadPortableRelation' ]); |
|
45 | 45 | |
46 | 46 | $this->load(array_diff($relations, $portableRelations)); |
47 | 47 | } |
@@ -54,11 +54,11 @@ discard block |
||
54 | 54 | */ |
55 | 55 | private function getPortableRelations(array $relations) |
56 | 56 | { |
57 | - $portableRelations = []; |
|
57 | + $portableRelations = [ ]; |
|
58 | 58 | |
59 | 59 | foreach ($relations as $relation) { |
60 | 60 | if ($this->$relation()->getRelated() instanceof PortableContract) { |
61 | - $portableRelations[] = $relation; |
|
61 | + $portableRelations[ ] = $relation; |
|
62 | 62 | } |
63 | 63 | } |
64 | 64 | |
@@ -73,10 +73,10 @@ discard block |
||
73 | 73 | */ |
74 | 74 | private function loadPortableRelation(string $relation) |
75 | 75 | { |
76 | - $this->attributes[$relation] = $this |
|
76 | + $this->attributes[ $relation ] = $this |
|
77 | 77 | ->$relation() |
78 | 78 | ->get() |
79 | - ->transform(function ($item) { |
|
79 | + ->transform(function($item) { |
|
80 | 80 | return $item->portable(); |
81 | 81 | }); |
82 | 82 | } |
@@ -23,11 +23,11 @@ discard block |
||
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 |
||
48 | 48 | Collection $users |
49 | 49 | ) { |
50 | 50 | $users->filter( |
51 | - function (Authenticatable $user) use ($inactivity, $notificationThreshold) { |
|
51 | + function(Authenticatable $user) use ($inactivity, $notificationThreshold) { |
|
52 | 52 | return $user->last_activity->diffInDays($inactivity) |
53 | 53 | === $notificationThreshold; |
54 | 54 | } |
55 | - )->each(function (Authenticatable $user) { |
|
55 | + )->each(function(Authenticatable $user) { |
|
56 | 56 | event(new GdprInactiveUser($user)); |
57 | 57 | }); |
58 | 58 | } |
@@ -68,9 +68,9 @@ discard block |
||
68 | 68 | Carbon $inactivity, |
69 | 69 | Collection $users |
70 | 70 | ) { |
71 | - $users->filter(function (Authenticatable $user) use ($inactivity) { |
|
71 | + $users->filter(function(Authenticatable $user) use ($inactivity) { |
|
72 | 72 | return $user->last_activity < $inactivity; |
73 | - })->each(function (Authenticatable $user) { |
|
73 | + })->each(function(Authenticatable $user) { |
|
74 | 74 | $user->delete(); |
75 | 75 | |
76 | 76 | event(new GdprInactiveUserDeleted($user)); |