Passed
Pull Request — master (#14)
by ARCANEDEV
08:06
created
src/Authorization/Http/Routes/Web/Roles/AdministratorsRoutes.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
             $this->prefix('{'.static::USER_WILDCARD.'}')->group(function () {
38 38
                 // admin::auth.roles.administrators.detach
39 39
                 $this->delete('detach', [AdministratorsController::class, 'detach'])
40
-                     ->name('detach');
40
+                        ->name('detach');
41 41
             });
42 42
         });
43 43
     }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function map(): void
35 35
     {
36
-        $this->prefix('administrators')->name('administrators.')->group(function () {
37
-            $this->prefix('{'.static::USER_WILDCARD.'}')->group(function () {
36
+        $this->prefix('administrators')->name('administrators.')->group(function() {
37
+            $this->prefix('{'.static::USER_WILDCARD.'}')->group(function() {
38 38
                 // admin::auth.roles.administrators.detach
39 39
                 $this->delete('detach', [AdministratorsController::class, 'detach'])
40 40
                      ->name('detach');
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function bindings(RolesRepository $repo): void
51 51
     {
52
-        $this->bind(static::USER_WILDCARD, function (string $uuid, Route $route) use ($repo) {
52
+        $this->bind(static::USER_WILDCARD, function(string $uuid, Route $route) use ($repo) {
53 53
             /** @var  \Arcanesoft\Foundation\Authorization\Models\Role  $role */
54 54
             $role = $route->parameter(RolesRoutes::ROLE_WILDCARD);
55 55
 
Please login to merge, or discard this patch.
src/Authorization/Http/Routes/Web/Roles/PermissionsRoutes.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
             $this->prefix('{'.static::PERMISSION_WILDCARD.'}')->group(function () {
38 38
                 // admin::auth.roles.permissions.detach
39 39
                 $this->delete('detach', [PermissionsController::class, 'detach'])
40
-                     ->name('detach');
40
+                        ->name('detach');
41 41
             });
42 42
         });
43 43
     }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function map(): void
35 35
     {
36
-        $this->prefix('permissions')->name('permissions.')->group(function () {
37
-            $this->prefix('{'.static::PERMISSION_WILDCARD.'}')->group(function () {
36
+        $this->prefix('permissions')->name('permissions.')->group(function() {
37
+            $this->prefix('{'.static::PERMISSION_WILDCARD.'}')->group(function() {
38 38
                 // admin::auth.roles.permissions.detach
39 39
                 $this->delete('detach', [PermissionsController::class, 'detach'])
40 40
                      ->name('detach');
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function bindings(RolesRepository $repo): void
51 51
     {
52
-        $this->bind(static::PERMISSION_WILDCARD, function (string $uuid, Route $route) use ($repo) {
52
+        $this->bind(static::PERMISSION_WILDCARD, function(string $uuid, Route $route) use ($repo) {
53 53
             /** @var  \Arcanesoft\Foundation\Authorization\Models\Role  $role */
54 54
             $role = $route->parameter(RolesRoutes::ROLE_WILDCARD);
55 55
 
Please login to merge, or discard this patch.
src/Authorization/Http/Routes/Web/Administrators/SessionsRoutes.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         $this->name('sessions.')->name('prefix')->group(function () {
37 37
             $this->prefix('{'.static::WILDCARD_SESSION.'}')->group(function () {
38 38
                 $this->delete('delete', [SessionsController::class, 'delete'])
39
-                     ->name('delete'); // admin::auth.administrators.sessions.delete
39
+                        ->name('delete'); // admin::auth.administrators.sessions.delete
40 40
             });
41 41
         });
42 42
     }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function map(): void
35 35
     {
36
-        $this->name('sessions.')->name('prefix')->group(function () {
37
-            $this->prefix('{'.static::WILDCARD_SESSION.'}')->group(function () {
36
+        $this->name('sessions.')->name('prefix')->group(function() {
37
+            $this->prefix('{'.static::WILDCARD_SESSION.'}')->group(function() {
38 38
                 $this->delete('delete', [SessionsController::class, 'delete'])
39 39
                      ->name('delete'); // admin::auth.administrators.sessions.delete
40 40
             });
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function bindings(SessionsRepository $repo): void
50 50
     {
51
-        $this->bind(static::WILDCARD_SESSION, function (string $uuid) use ($repo) {
51
+        $this->bind(static::WILDCARD_SESSION, function(string $uuid) use ($repo) {
52 52
             return $repo->firstByIdOrFail($uuid);
53 53
         });
54 54
     }
Please login to merge, or discard this patch.
src/Authorization/Http/Routes/Web/PasswordResetsRoutes.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      */
24 24
     public function map(): void
25 25
     {
26
-        $this->name('password-resets.')->prefix('password-resets')->group(function () {
26
+        $this->name('password-resets.')->prefix('password-resets')->group(function() {
27 27
             // admin::authorization.password-resets.index
28 28
             $this->get('/', [PasswordResetsController::class, 'index'])
29 29
                  ->name('index');
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,16 +26,16 @@
 block discarded – undo
26 26
         $this->name('password-resets.')->prefix('password-resets')->group(function () {
27 27
             // admin::authorization.password-resets.index
28 28
             $this->get('/', [PasswordResetsController::class, 'index'])
29
-                 ->name('index');
29
+                    ->name('index');
30 30
 
31 31
             // admin::authorization.password-resets.datatable
32 32
             $this->post('datatable', [PasswordResetsController::class, 'datatable'])
33
-                 ->middleware(['ajax'])
34
-                 ->name('datatable');
33
+                    ->middleware(['ajax'])
34
+                    ->name('datatable');
35 35
 
36 36
             // admin::authorization.password-resets.metrics
37 37
             $this->get('metrics', [PasswordResetsController::class, 'metrics'])
38
-                 ->name('metrics');
38
+                    ->name('metrics');
39 39
         });
40 40
     }
41 41
 }
Please login to merge, or discard this patch.
src/Authorization/Http/Routes/Web/SettingsRoutes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      */
24 24
     public function map(): void
25 25
     {
26
-        $this->name('settings.')->prefix('settings')->group(function () {
26
+        $this->name('settings.')->prefix('settings')->group(function() {
27 27
             // admin::auth.settings.index
28 28
             $this->get('/', [SettingsController::class, 'index'])
29 29
                 ->name('index');
Please login to merge, or discard this patch.
src/Authorization/Http/Middleware/TrackLastActivity.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,9 @@
 block discarded – undo
31 31
      */
32 32
     public function handle($request, Closure $next, $guard = null)
33 33
     {
34
-        if (Auth::guard($guard)->check())
35
-            Auth::guard($guard)->user()->updateLastActivity();
34
+        if (Auth::guard($guard)->check()) {
35
+                    Auth::guard($guard)->user()->updateLastActivity();
36
+        }
36 37
 
37 38
         return $next($request);
38 39
     }
Please login to merge, or discard this patch.
src/Authorization/Session/DatabaseSessionHandler.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@
 block discarded – undo
212 212
             return $payload;
213 213
         }
214 214
 
215
-        return tap($payload, function (&$payload) {
215
+        return tap($payload, function(&$payload) {
216 216
             $this->addUserInformation($payload);
217 217
             $this->addRequestInformation($payload);
218 218
         });
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -98,8 +98,9 @@  discard block
 block discarded – undo
98 98
     {
99 99
         $session = $this->findSession($sessionId);
100 100
 
101
-        if (is_null($session))
102
-            return '';
101
+        if (is_null($session)) {
102
+                    return '';
103
+        }
103 104
 
104 105
         if ($session->hasExpired()) {
105 106
             $this->exists = true;
@@ -148,8 +149,7 @@  discard block
 block discarded – undo
148 149
 
149 150
         try {
150 151
             return $this->repo->newModelInstance($attributes)->save();
151
-        }
152
-        catch (QueryException $e) {
152
+        } catch (QueryException $e) {
153 153
             $this->performUpdate($sessionId, $attributes);
154 154
         }
155 155
 
Please login to merge, or discard this patch.
src/Authorization/Notifications/Authentication/ResetPassword.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,8 +72,9 @@  discard block
 block discarded – undo
72 72
      */
73 73
     private static function getAuthProviderKey($notifiable): string
74 74
     {
75
-        if ($notifiable instanceof Administrator)
76
-            return 'admins';
75
+        if ($notifiable instanceof Administrator) {
76
+                    return 'admins';
77
+        }
77 78
 
78 79
         return 'users';
79 80
     }
@@ -87,8 +88,9 @@  discard block
 block discarded – undo
87 88
      */
88 89
     protected static function getPasswordResetRoute($authProviderKey): string
89 90
     {
90
-        if ($authProviderKey === 'admins')
91
-            return 'admin::auth.password.reset';
91
+        if ($authProviderKey === 'admins') {
92
+                    return 'admin::auth.password.reset';
93
+        }
92 94
 
93 95
         return 'auth::password.reset';
94 96
     }
Please login to merge, or discard this patch.
src/Authorization/Console/MakeAdmin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
      */
72 72
     protected static function defaultCreateUserCallback(): Closure
73 73
     {
74
-        return function (string $firstName, string $lastName, string $email, string $password) {
74
+        return function(string $firstName, string $lastName, string $email, string $password) {
75 75
             $repo = static::getAdministratorsRepository();
76 76
 
77 77
             $administrator = $repo->createOne([
Please login to merge, or discard this patch.