Passed
Pull Request — master (#14)
by ARCANEDEV
08:06
created
src/Authorization/Models/Administrator.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
         return $this->active_roles
166 166
             ->pluck('permissions')
167 167
             ->flatten()
168
-            ->unique(function (Permission $permission) {
168
+            ->unique(function(Permission $permission) {
169 169
                 return $permission->getKey();
170 170
             });
171 171
     }
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
      */
210 210
     public function may($ability): bool
211 211
     {
212
-        return $this->permissions->filter(function (Permission $permission) use ($ability) {
212
+        return $this->permissions->filter(function(Permission $permission) use ($ability) {
213 213
             return $permission->hasAbility($ability);
214 214
         })->isNotEmpty();
215 215
     }
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
             ? $permissions
229 229
             : $this->newCollection($permissions);
230 230
 
231
-        $failed = $permissions->reject(function ($permission) {
231
+        $failed = $permissions->reject(function($permission) {
232 232
             return $this->may($permission);
233 233
         })->values();
234 234
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -287,8 +287,9 @@  discard block
 block discarded – undo
287 287
      */
288 288
     public function canImpersonate(): bool
289 289
     {
290
-        if ( ! impersonator()->isEnabled())
291
-            return false;
290
+        if ( ! impersonator()->isEnabled()) {
291
+                    return false;
292
+        }
292 293
 
293 294
         return $this->isSuperAdmin();
294 295
     }
@@ -300,8 +301,9 @@  discard block
 block discarded – undo
300 301
      */
301 302
     public function canBeImpersonated(): bool
302 303
     {
303
-        if ( ! impersonator()->isEnabled())
304
-            return false;
304
+        if ( ! impersonator()->isEnabled()) {
305
+                    return false;
306
+        }
305 307
 
306 308
         return false;
307 309
     }
Please login to merge, or discard this patch.
src/Authorization/Models/TwoFactor.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -151,8 +151,9 @@
 block discarded – undo
151 151
     public function getValidRecoveryCode(string $code)
152 152
     {
153 153
         foreach ($this->decrypted_recovery_codes as $recoveryCode) {
154
-            if (hash_equals($code, $recoveryCode))
155
-                return $recoveryCode;
154
+            if (hash_equals($code, $recoveryCode)) {
155
+                            return $recoveryCode;
156
+            }
156 157
         }
157 158
 
158 159
         return null;
Please login to merge, or discard this patch.
src/Authorization/Providers/SessionServiceProvider.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
      */
44 44
     protected function registerCustomSessionHandler(SessionManager $session): void
45 45
     {
46
-        $session->extend('arcanesoft', function (Container $app) {
46
+        $session->extend('arcanesoft', function(Container $app) {
47 47
             return new DatabaseSessionHandler($app->make(SessionsRepository::class), $app);
48 48
         });
49 49
     }
Please login to merge, or discard this patch.
src/Authorization/Auth.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -169,8 +169,9 @@
 block discarded – undo
169 169
     {
170 170
         $emails = (array) static::config('administrators.emails');
171 171
 
172
-        if (empty($emails))
173
-            return false;
172
+        if (empty($emails)) {
173
+                    return false;
174
+        }
174 175
 
175 176
         return in_array($user->email, $emails);
176 177
     }
Please login to merge, or discard this patch.
src/Authorization/Database/Factories/UserFactory.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,8 +72,9 @@
 block discarded – undo
72 72
      */
73 73
     public function verified($date = null): self
74 74
     {
75
-        if (is_null($date))
76
-            $date = now();
75
+        if (is_null($date)) {
76
+                    $date = now();
77
+        }
77 78
 
78 79
         return $this->state([
79 80
             'email_verified_at' => $date === false ? null : $date,
Please login to merge, or discard this patch.
src/Fortify/Concerns/HasPasswordBroker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      */
26 26
     protected static function broker(): PasswordBroker
27 27
     {
28
-        return with(app('auth.password'), function (PasswordBrokerFactory $manager) {
28
+        return with(app('auth.password'), function(PasswordBrokerFactory $manager) {
29 29
             return $manager->broker(static::getBrokerDriver());
30 30
         });
31 31
     }
Please login to merge, or discard this patch.
src/Fortify/Auth/SendsPasswordResetLink.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,8 +41,9 @@  discard block
 block discarded – undo
41 41
     {
42 42
         $status = $this->broker()->sendResetLink($credentials);
43 43
 
44
-        if ($status === PasswordBroker::RESET_LINK_SENT)
45
-            return $this->getSuccessResponse($request, $status);
44
+        if ($status === PasswordBroker::RESET_LINK_SENT) {
45
+                    return $this->getSuccessResponse($request, $status);
46
+        }
46 47
 
47 48
         return $this->getFailedResponse($request, $status);
48 49
     }
@@ -62,8 +63,9 @@  discard block
 block discarded – undo
62 63
     {
63 64
         $status = trans($status);
64 65
 
65
-        if ($request->wantsJson())
66
-            return new JsonResponse(['message' => trans($status)], JsonResponse::HTTP_OK);
66
+        if ($request->wantsJson()) {
67
+                    return new JsonResponse(['message' => trans($status)], JsonResponse::HTTP_OK);
68
+        }
67 69
 
68 70
         return redirect()
69 71
             ->back()
@@ -82,10 +84,11 @@  discard block
 block discarded – undo
82 84
     {
83 85
         $status = trans($status);
84 86
 
85
-        if ($request->wantsJson())
86
-            throw ValidationException::withMessages([
87
+        if ($request->wantsJson()) {
88
+                    throw ValidationException::withMessages([
87 89
                 'email' => $status,
88 90
             ]);
91
+        }
89 92
 
90 93
         return redirect()
91 94
             ->back()
Please login to merge, or discard this patch.
src/Fortify/Auth/RegistersUsers.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,8 +82,9 @@
 block discarded – undo
82 82
      */
83 83
     protected function getRegisteredResponse(Request $request, $user)
84 84
     {
85
-        if ($request->wantsJson())
86
-            new Response('', Response::HTTP_CREATED);
85
+        if ($request->wantsJson()) {
86
+                    new Response('', Response::HTTP_CREATED);
87
+        }
87 88
 
88 89
         return redirect()->to($this->redirectUrlAfterRegister($request, $user));
89 90
     }
Please login to merge, or discard this patch.
src/Fortify/Auth/AuthenticatesUsers.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
@@ -96,8 +96,9 @@
 block discarded – undo
96 96
     {
97 97
         $url = $this->redirectUrlAfterLogout($request);
98 98
 
99
-        if ($request->wantsJson())
100
-            return new JsonResponse(['redirect' => $url]);
99
+        if ($request->wantsJson()) {
100
+                    return new JsonResponse(['redirect' => $url]);
101
+        }
101 102
 
102 103
         return redirect()->to($url);
103 104
     }
Please login to merge, or discard this patch.