Passed
Pull Request — master (#14)
by ARCANEDEV
08:55
created
src/Core/Http/Middleware/EnsureEmailIsVerified.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -57,11 +57,13 @@  discard block
 block discarded – undo
57 57
     {
58 58
         $user = $request->user();
59 59
 
60
-        if (is_null($user))
61
-            return false;
60
+        if (is_null($user)) {
61
+                    return false;
62
+        }
62 63
 
63
-        if ( ! $user instanceof MustVerifyEmail)
64
-            return false;
64
+        if ( ! $user instanceof MustVerifyEmail) {
65
+                    return false;
66
+        }
65 67
 
66 68
         return ! $user->hasVerifiedEmail();
67 69
     }
@@ -76,8 +78,9 @@  discard block
 block discarded – undo
76 78
      */
77 79
     protected function getMustBeVerifiedResponse(Request $request, string $redirectToRoute)
78 80
     {
79
-        if ($request->expectsJson())
80
-            abort(Response::HTTP_FORBIDDEN, 'Your email address is not verified.');
81
+        if ($request->expectsJson()) {
82
+                    abort(Response::HTTP_FORBIDDEN, 'Your email address is not verified.');
83
+        }
81 84
 
82 85
         return Redirect::route($redirectToRoute);
83 86
     }
Please login to merge, or discard this patch.
src/Core/Http/Middleware/EnsureIsActive.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,9 @@
 block discarded – undo
47 47
      */
48 48
     private function isActivated($user): bool
49 49
     {
50
-        if ( ! $user instanceof CanBeActivated)
51
-            return false;
50
+        if ( ! $user instanceof CanBeActivated) {
51
+                    return false;
52
+        }
52 53
 
53 54
         return $user->isActive();
54 55
     }
Please login to merge, or discard this patch.
src/Core/Http/Controllers/Api/MetricsController.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,9 @@
 block discarded – undo
36 36
 
37 37
         abort_if(is_null($metric), Response::HTTP_NOT_FOUND, __('Metric not found'));
38 38
 
39
-        if ($metric->authorizedToSee($request))
40
-            return response()->json($metric->resolve($request)->toArray());
39
+        if ($metric->authorizedToSee($request)) {
40
+                    return response()->json($metric->resolve($request)->toArray());
41
+        }
41 42
 
42 43
         return response()->json([
43 44
             'message' => 'Access Not Allowed',
Please login to merge, or discard this patch.
src/Core/Views/Composers/MetricsComposer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,10 +62,10 @@
 block discarded – undo
62 62
     public function compose(View $view): void
63 63
     {
64 64
         $metrics = $this->manager->makeSelected()
65
-            ->filter(function ($metric) {
65
+            ->filter(function($metric) {
66 66
                 return $metric->authorizedToSee(request());
67 67
             })
68
-            ->transform(function (Metric $metric) {
68
+            ->transform(function(Metric $metric) {
69 69
                 return Element::withTag("{$metric->type()}-metric")->attribute(':metric', $metric->toJson());
70 70
             });
71 71
 
Please login to merge, or discard this patch.
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.