Passed
Push — master ( fd803f...bf0d13 )
by Darko
08:24
created
app/Http/Controllers/PasswordSecurityController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
     public function disable2fa(Disable2faPasswordSecurityRequest $request): \Illuminate\Routing\Redirector|RedirectResponse|\Illuminate\Contracts\Foundation\Application
79 79
     {
80
-        if (! (Hash::check($request->get('current-password'), $request->user()->password))) {
80
+        if (!(Hash::check($request->get('current-password'), $request->user()->password))) {
81 81
             // The passwords matches
82 82
             return redirect()->back()->with('error', 'Your password does not match with your account password. Please try again.');
83 83
         }
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         ]);
101 101
 
102 102
         // Get the user ID from session
103
-        if (! $request->session()->has('2fa:user:id')) {
103
+        if (!$request->session()->has('2fa:user:id')) {
104 104
             return redirect()->route('login')
105 105
                 ->with('message', 'The two-factor authentication session has expired. Please login again.')
106 106
                 ->with('message_type', 'danger');
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         $userId = $request->session()->get('2fa:user:id');
110 110
         $user = \App\Models\User::find($userId);
111 111
 
112
-        if (! $user || ! $user->passwordSecurity) {
112
+        if (!$user || !$user->passwordSecurity) {
113 113
             $request->session()->forget('2fa:user:id');
114 114
 
115 115
             return redirect()->route('login')
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
             $request->input('one_time_password')
124 124
         );
125 125
 
126
-        if (! $valid) {
126
+        if (!$valid) {
127 127
             return redirect()->route('2fa.verify')
128 128
                 ->with('message', 'Invalid authentication code. Please try again.')
129 129
                 ->with('message_type', 'danger');
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     public function getVerify2fa(Request $request)
157 157
     {
158 158
         // Check if user ID is stored in the session
159
-        if (! $request->session()->has('2fa:user:id')) {
159
+        if (!$request->session()->has('2fa:user:id')) {
160 160
             return redirect()->route('login')
161 161
                 ->withErrors(['msg' => 'The two-factor authentication session has expired. Please login again.']);
162 162
         }
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 
167 167
         // Get the user
168 168
         $user = \App\Models\User::find($userId);
169
-        if (! $user) {
169
+        if (!$user) {
170 170
             $request->session()->forget('2fa:user:id');
171 171
 
172 172
             return redirect()->route('login')
Please login to merge, or discard this patch.