| @@ -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)); | 
| @@ -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 | |
| @@ -77,17 +77,17 @@ discard block | ||
| 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 | /** | 
| @@ -43,7 +43,7 @@ | ||
| 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 | |
| @@ -30,8 +30,8 @@ discard block | ||
| 30 | 30 |              'prefix'     => config('gdpr.uri'), | 
| 31 | 31 | 'namespace' => 'Soved\Laravel\Gdpr\Http\Controllers', | 
| 32 | 32 |              'middleware' => config('gdpr.middleware'), | 
| 33 | -        ], function () { | |
| 34 | - $this->loadRoutesFrom(__DIR__.'/../routes/web.php'); | |
| 33 | +        ], function() { | |
| 34 | + $this->loadRoutesFrom(__DIR__ . '/../routes/web.php'); | |
| 35 | 35 | }); | 
| 36 | 36 | } | 
| 37 | 37 | |
| @@ -68,7 +68,7 @@ discard block | ||
| 68 | 68 | protected function configure() | 
| 69 | 69 |      { | 
| 70 | 70 | $this->mergeConfigFrom( | 
| 71 | - __DIR__.'/../config/gdpr.php', | |
| 71 | + __DIR__ . '/../config/gdpr.php', | |
| 72 | 72 | 'gdpr' | 
| 73 | 73 | ); | 
| 74 | 74 | } | 
| @@ -82,7 +82,7 @@ discard block | ||
| 82 | 82 |      { | 
| 83 | 83 |          if ($this->app->runningInConsole()) { | 
| 84 | 84 | $this->publishes([ | 
| 85 | -                __DIR__.'/../config/gdpr.php' => config_path('gdpr.php'), | |
| 85 | +                __DIR__ . '/../config/gdpr.php' => config_path('gdpr.php'), | |
| 86 | 86 | ], 'gdpr-config'); | 
| 87 | 87 | } | 
| 88 | 88 | } | 
| @@ -17,7 +17,7 @@ | ||
| 17 | 17 | */ | 
| 18 | 18 | public function download(GdprDownload $request) | 
| 19 | 19 |      { | 
| 20 | -        if (! $this->validateRequest($request)) { | |
| 20 | +        if (!$this->validateRequest($request)) { | |
| 21 | 21 | return $this->sendFailedLoginResponse(); | 
| 22 | 22 | } | 
| 23 | 23 | |
| @@ -16,7 +16,7 @@ discard block | ||
| 16 | 16 | $value = parent::getAttributeValue($key); | 
| 17 | 17 | |
| 18 | 18 | if (in_array($key, $this->encrypted) && | 
| 19 | -            ! is_null($value)) { | |
| 19 | +            !is_null($value)) { | |
| 20 | 20 | return decrypt($value); | 
| 21 | 21 | } | 
| 22 | 22 | |
| @@ -36,7 +36,7 @@ discard block | ||
| 36 | 36 | $value | 
| 37 | 37 |      ) { | 
| 38 | 38 | if (in_array($key, $this->encrypted) && | 
| 39 | -            ! is_null($value)) { | |
| 39 | +            !is_null($value)) { | |
| 40 | 40 | $value = encrypt($value); | 
| 41 | 41 | } | 
| 42 | 42 | |