Passed
Pull Request — master (#14)
by ARCANEDEV
06:16
created
src/System/Views/Composers/FoldersPermissionsComposer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
      */
69 69
     protected static function getFoldersPermissions(array $folders): array
70 70
     {
71
-        return array_map(function ($folder) {
71
+        return array_map(function($folder) {
72 72
             $path = base_path($folder);
73 73
 
74 74
             return [
Please login to merge, or discard this patch.
src/System/Metrics/LogViewer/LogEntriesCountByLevel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
      */
55 55
     private static function calculateEntriesByLevel(LogViewer $logViewer): array
56 56
     {
57
-        return $logViewer->all()->reduce(function ($count, Log $log) {
57
+        return $logViewer->all()->reduce(function($count, Log $log) {
58 58
             foreach ($log->entries()->groupBy('level') as $level => $entries) {
59 59
                 /** @var  \Arcanedev\LogViewer\Entities\LogEntryCollection  $entries */
60 60
                 $count[$level] = ($count[$level] ?? 0) + $entries->count();
Please login to merge, or discard this patch.
database/migrations/2019_01_01_000012_create_auth_two_factors_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     public function up(): void
42 42
     {
43
-        $this->createSchema(function (Blueprint $table) {
43
+        $this->createSchema(function(Blueprint $table) {
44 44
             $table->id();
45 45
             $table->morphs('two_factorable');
46 46
             $table->text('secret')->nullable();
Please login to merge, or discard this patch.
config/auth.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,8 +96,8 @@
 block discarded – undo
96 96
             'two_factors'         => 'two_factors',
97 97
         ],
98 98
 
99
-         // Models
100
-         // ----------------------------------
99
+            // Models
100
+            // ----------------------------------
101 101
 
102 102
         'models' => [
103 103
             'user'               => App\Models\User::class,
Please login to merge, or discard this patch.
src/Core/Http/Middleware/EnsureEmailIsVerified.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -56,11 +56,13 @@  discard block
 block discarded – undo
56 56
     {
57 57
         $user = $request->user();
58 58
 
59
-        if (is_null($user))
60
-            return false;
59
+        if (is_null($user)) {
60
+                    return false;
61
+        }
61 62
 
62
-        if ( ! $user instanceof MustVerifyEmail)
63
-            return false;
63
+        if ( ! $user instanceof MustVerifyEmail) {
64
+                    return false;
65
+        }
64 66
 
65 67
         return ! $user->hasVerifiedEmail();
66 68
     }
@@ -75,8 +77,9 @@  discard block
 block discarded – undo
75 77
      */
76 78
     protected function getMustBeVerifiedResponse(Request $request, string $redirectToRoute)
77 79
     {
78
-        if ($request->expectsJson())
79
-            abort(Response::HTTP_FORBIDDEN, 'Your email address is not verified.');
80
+        if ($request->expectsJson()) {
81
+                    abort(Response::HTTP_FORBIDDEN, 'Your email address is not verified.');
82
+        }
80 83
 
81 84
         return redirect()->route($redirectToRoute);
82 85
     }
Please login to merge, or discard this patch.
src/Fortify/Http/Requests/TwoFactorLoginRequest.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,8 +80,9 @@
 block discarded – undo
80 80
      */
81 81
     public function hasValidCode(): bool
82 82
     {
83
-        if (is_null($this->code))
84
-            return false;
83
+        if (is_null($this->code)) {
84
+                    return false;
85
+        }
85 86
 
86 87
         $secret = $this->twoFactor()->decrypted_secret;
87 88
 
Please login to merge, or discard this patch.
src/Fortify/Actions/Authentication/Login/RedirectIfTwoFactorWasEnabled.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -97,8 +97,9 @@  discard block
 block discarded – undo
97 97
      */
98 98
     protected function shouldUseTwoFactor($user): bool
99 99
     {
100
-        if ( ! Auth::isTwoFactorEnabled())
101
-            return false;
100
+        if ( ! Auth::isTwoFactorEnabled()) {
101
+                    return false;
102
+        }
102 103
 
103 104
         return optional($user)->isTwoFactorEnabled()
104 105
             && in_array(HasTwoFactorAuthentication::class, class_uses_recursive($user));
@@ -140,8 +141,9 @@  discard block
 block discarded – undo
140 141
      */
141 142
     protected function twoFactorChallengeResponse(Request $request, $user)
142 143
     {
143
-        if ($request->wantsJson())
144
-            return new JsonResponse(['two_factor' => true]);
144
+        if ($request->wantsJson()) {
145
+                    return new JsonResponse(['two_factor' => true]);
146
+        }
145 147
 
146 148
         return redirect()->to($this->getTwoFactorUrl($request));
147 149
     }
Please login to merge, or discard this patch.
src/Auth/Views/Components/AdministratorsDatatable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,13 +77,13 @@
 block discarded – undo
77 77
     {
78 78
         return $repo
79 79
             ->onlyTrashed($this->trash)
80
-            ->unless(empty($this->search), function (Builder $query) {
80
+            ->unless(empty($this->search), function(Builder $query) {
81 81
                 $query
82 82
                     ->where('first_name', 'like', '%'.$this->search.'%')
83 83
                     ->orWhere('last_name', 'like', '%'.$this->search.'%')
84 84
                     ->orWhere('email', 'like', '%'.$this->search.'%');
85 85
             })
86
-            ->unless(empty($this->sortField), function (Builder $query) {
86
+            ->unless(empty($this->sortField), function(Builder $query) {
87 87
                 $query->orderBy($this->sortField, $this->getSortDirection());
88 88
             })
89 89
             ->paginate($this->perPage);
Please login to merge, or discard this patch.
src/Auth/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.