Passed
Pull Request — master (#14)
by ARCANEDEV
08:28
created
src/Core/Views/Composers/NotificationsComposer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
     {
61 61
         $view->with(
62 62
             'foundationNotifications',
63
-            $this->notifier->notifications()->transform(function (array $notification) {
63
+            $this->notifier->notifications()->transform(function(array $notification) {
64 64
                 return static::prepareNotification($notification);
65 65
             })
66 66
         );
Please login to merge, or discard this patch.
src/Authentication/Http/Routes/ConfirmPasswordRoutes.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -33,17 +33,17 @@
 block discarded – undo
33 33
     public function map(): void
34 34
     {
35 35
         $this->prefix('password/confirm')
36
-             ->name('password.confirm.')
37
-             ->middleware(['arcanesoft'])
38
-             ->group(function () {
39
-                 // admin::auth.password.confirm.create
40
-                 $this->get('/', [ConfirmPasswordController::class, 'create'])
41
-                      ->name('create');
42
-
43
-                 // admin::auth.password.confirm.store
44
-                 $this->post('/', [ConfirmPasswordController::class, 'store'])
45
-                      ->name('store');
46
-             });
36
+                ->name('password.confirm.')
37
+                ->middleware(['arcanesoft'])
38
+                ->group(function () {
39
+                    // admin::auth.password.confirm.create
40
+                    $this->get('/', [ConfirmPasswordController::class, 'create'])
41
+                        ->name('create');
42
+
43
+                    // admin::auth.password.confirm.store
44
+                    $this->post('/', [ConfirmPasswordController::class, 'store'])
45
+                        ->name('store');
46
+                });
47 47
     }
48 48
 
49 49
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         $this->prefix('password/confirm')
36 36
              ->name('password.confirm.')
37 37
              ->middleware(['arcanesoft'])
38
-             ->group(function () {
38
+             ->group(function() {
39 39
                  // admin::auth.password.confirm.create
40 40
                  $this->get('/', [ConfirmPasswordController::class, 'create'])
41 41
                       ->name('create');
Please login to merge, or discard this patch.
src/Authentication/Http/Routes/PasswordResetRoutes.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -35,24 +35,24 @@
 block discarded – undo
35 35
     public function map(): void
36 36
     {
37 37
         $this->prefix('password')
38
-             ->name('password.')
39
-             ->middleware(['guest'])
40
-             ->group(function () {
41
-                 // admin::auth.password.request
42
-                 $this->get('forgotten', [PasswordResetLinkController::class, 'create'])
43
-                      ->name('request');
44
-
45
-                 // admin::auth.password.email
46
-                 $this->post('forgotten', [PasswordResetLinkController::class, 'store'])
47
-                      ->name('email');
48
-
49
-                 // admin::auth.password.reset
50
-                 $this->get('reset/{token}', [ResetPasswordController::class, 'edit'])
51
-                      ->name('reset');
52
-
53
-                 // admin::auth.password.update
54
-                 $this->post('reset', [ResetPasswordController::class, 'update'])
55
-                      ->name('update');
56
-             });
38
+                ->name('password.')
39
+                ->middleware(['guest'])
40
+                ->group(function () {
41
+                    // admin::auth.password.request
42
+                    $this->get('forgotten', [PasswordResetLinkController::class, 'create'])
43
+                        ->name('request');
44
+
45
+                    // admin::auth.password.email
46
+                    $this->post('forgotten', [PasswordResetLinkController::class, 'store'])
47
+                        ->name('email');
48
+
49
+                    // admin::auth.password.reset
50
+                    $this->get('reset/{token}', [ResetPasswordController::class, 'edit'])
51
+                        ->name('reset');
52
+
53
+                    // admin::auth.password.update
54
+                    $this->post('reset', [ResetPasswordController::class, 'update'])
55
+                        ->name('update');
56
+                });
57 57
     }
58 58
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         $this->prefix('password')
38 38
              ->name('password.')
39 39
              ->middleware(['guest'])
40
-             ->group(function () {
40
+             ->group(function() {
41 41
                  // admin::auth.password.request
42 42
                  $this->get('forgotten', [PasswordResetLinkController::class, 'create'])
43 43
                       ->name('request');
Please login to merge, or discard this patch.
src/Authentication/Http/Routes/LoginRoutes.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,12 +53,12 @@  discard block
 block discarded – undo
53 53
         $this->prefix('login')->name('login.')->middleware(['guest'])->group(function () {
54 54
             // admin::auth.login.create
55 55
             $this->get('/', [LoginController::class, 'create'])
56
-                 ->name('create');
56
+                    ->name('create');
57 57
 
58 58
             // admin::auth.login.store
59 59
             $this->post('/', [LoginController::class, 'store'])
60
-                 ->middleware([LoginRateLimiter::middleware()])
61
-                 ->name('store');
60
+                    ->middleware([LoginRateLimiter::middleware()])
61
+                    ->name('store');
62 62
         });
63 63
     }
64 64
 
@@ -88,6 +88,6 @@  discard block
 block discarded – undo
88 88
     {
89 89
         // admin::auth.logout
90 90
         $this->delete('logout', [LoginController::class, 'destroy'])
91
-             ->name('logout');
91
+                ->name('logout');
92 92
     }
93 93
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     protected function mapLoginRoutes(): void
52 52
     {
53
-        $this->prefix('login')->name('login.')->middleware(['guest'])->group(function () {
53
+        $this->prefix('login')->name('login.')->middleware(['guest'])->group(function() {
54 54
             // admin::auth.login.create
55 55
             $this->get('/', [LoginController::class, 'create'])
56 56
                  ->name('create');
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         if ( ! Auth::isTwoFactorEnabled())
71 71
             return;
72 72
 
73
-        $this->prefix('two-factor-challenge')->name('two-factor.')->group(function () {
73
+        $this->prefix('two-factor-challenge')->name('two-factor.')->group(function() {
74 74
             // admin::auth.login.two-factor.create
75 75
             $this->get('/', [TwoFactorLoginController::class, 'create'])
76 76
                 ->name('create');
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,8 +67,9 @@
 block discarded – undo
67 67
      */
68 68
     private function mapTwoFactorRoutes(): void
69 69
     {
70
-        if ( ! Auth::isTwoFactorEnabled())
71
-            return;
70
+        if ( ! Auth::isTwoFactorEnabled()) {
71
+                    return;
72
+        }
72 73
 
73 74
         $this->prefix('two-factor-challenge')->name('two-factor.')->group(function () {
74 75
             // admin::auth.login.two-factor.create
Please login to merge, or discard this patch.
src/Authentication/Http/Routes/AuthenticationRoutes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@
 block discarded – undo
23 23
      */
24 24
     public function map(): void
25 25
     {
26
-        $this->adminGroup(function () {
27
-            $this->prefix('auth')->name('auth.')->group(function () {
26
+        $this->adminGroup(function() {
27
+            $this->prefix('auth')->name('auth.')->group(function() {
28 28
                 static::mapRouteClasses([
29 29
                     ConfirmPasswordRoutes::class,
30 30
                     LoginRoutes::class,
Please login to merge, or discard this patch.
src/Fortify/LoginRateLimiter.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -115,8 +115,9 @@
 block discarded – undo
115 115
      */
116 116
     public static function middleware(): ?string
117 117
     {
118
-        if ( ! static::isEnabled())
119
-            return null;
118
+        if ( ! static::isEnabled()) {
119
+                    return null;
120
+        }
120 121
 
121 122
         return 'throttle:'.Auth::config('limiters.login.throttle');
122 123
     }
Please login to merge, or discard this patch.
src/Fortify/Http/Middleware/RequirePassword.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,9 @@
 block discarded – undo
55 55
      */
56 56
     protected function shouldConfirmPassword(Request $request): bool
57 57
     {
58
-        if ( ! $this->hasPassword($request))
59
-            return false;
58
+        if ( ! $this->hasPassword($request)) {
59
+                    return false;
60
+        }
60 61
 
61 62
         $confirmedAt = time() - $request->session()->get('auth.password_confirmed_at', 0);
62 63
 
Please login to merge, or discard this patch.
src/Fortify/Http/Controllers/LoginController.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
         return (new Pipeline(app()))
42 42
             ->send($request)
43 43
             ->through($actions)
44
-            ->then(function ($request) {
44
+            ->then(function($request) {
45 45
                 return $this->getLoginResponse($request);
46 46
             });
47 47
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,8 +97,9 @@
 block discarded – undo
97 97
     {
98 98
         $url = $this->redirectUrlAfterLogout($request);
99 99
 
100
-        if ($request->wantsJson())
101
-            return new Response(['redirect' => $url]);
100
+        if ($request->wantsJson()) {
101
+                    return new Response(['redirect' => $url]);
102
+        }
102 103
 
103 104
         return redirect()->to($url);
104 105
     }
Please login to merge, or discard this patch.
src/Fortify/Http/Controllers/TwoFactorLoginController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
 
71 71
         if ($code = $request->validRecoveryCode()) {
72 72
             $this->getTwoFactorAuthenticationRepository()
73
-                 ->replaceRecoveryCode($user, $code);
73
+                    ->replaceRecoveryCode($user, $code);
74 74
         }
75 75
         elseif ( ! $request->hasValidCode()) {
76 76
             return $this->getFailedTwoFactorLoginResponse($request);
Please login to merge, or discard this patch.
Braces   +10 added lines, -8 removed lines patch added patch discarded remove patch
@@ -40,13 +40,15 @@  discard block
 block discarded – undo
40 40
      */
41 41
     protected function form(string $view, Request $request = null)
42 42
     {
43
-        if (is_null($request))
44
-            $request = request();
43
+        if (is_null($request)) {
44
+                    $request = request();
45
+        }
45 46
 
46
-        if (is_null($request->session()->get('login.id')))
47
-            return redirect()->to(
47
+        if (is_null($request->session()->get('login.id'))) {
48
+                    return redirect()->to(
48 49
                 $this->getFailedTwoFactorRedirectUrl($request)
49 50
             );
51
+        }
50 52
 
51 53
         $request->session()->reflash();
52 54
 
@@ -71,8 +73,7 @@  discard block
 block discarded – undo
71 73
         if ($code = $request->validRecoveryCode()) {
72 74
             $this->getTwoFactorAuthenticationRepository()
73 75
                  ->replaceRecoveryCode($user, $code);
74
-        }
75
-        elseif ( ! $request->hasValidCode()) {
76
+        } elseif ( ! $request->hasValidCode()) {
76 77
             return $this->getFailedTwoFactorLoginResponse($request);
77 78
         }
78 79
 
@@ -91,8 +92,9 @@  discard block
 block discarded – undo
91 92
      */
92 93
     protected function getTwoFactorLoginResponse(Request $request, $user)
93 94
     {
94
-        if ($request->wantsJson())
95
-            return new Response('', Response::HTTP_NO_CONTENT);
95
+        if ($request->wantsJson()) {
96
+                    return new Response('', Response::HTTP_NO_CONTENT);
97
+        }
96 98
 
97 99
         return redirect()->to($this->getRedirectUrlAfterLogin($request, $user));
98 100
     }
Please login to merge, or discard this patch.