Passed
Pull Request — master (#36)
by Sander
03:17
created
src/GdprServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
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
     }
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 (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
 block discarded – undo
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));
Please login to merge, or discard this patch.
src/Portable.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
@@ -77,17 +77,17 @@  discard block
 block discarded – undo
77 77
 
78 78
         $collection = $instance
79 79
             ->get()
80
-            ->transform(function ($item) {
80
+            ->transform(function($item) {
81 81
                 return $item->portable();
82 82
             });
83 83
 
84 84
         $class = class_basename(get_class($instance));
85 85
 
86
-        if (in_array($class, ['HasOne', 'BelongsTo'])) {
86
+        if (in_array($class, [ 'HasOne', 'BelongsTo' ])) {
87 87
             $collection = $collection->first();
88 88
         }
89 89
 
90
-        $this->attributes[$relation] = $collection;
90
+        $this->attributes[ $relation ] = $collection;
91 91
     }
92 92
 
93 93
     /**
Please login to merge, or discard this patch.
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
         $userModel = config('auth.providers.users.model');
44 44
         $users = $userModel::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.