ResetPasswordController   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 6
c 1
b 0
f 0
dl 0
loc 16
ccs 0
cts 0
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 11 3
1
<?php
2
3
namespace App\Http\Controllers\Auth;
4
5
use Inertia\Inertia;
6
7
use Illuminate\Http\Request;
8
9
use App\Http\Controllers\Controller;
10
11
class ResetPasswordController extends Controller
12
{
13
    /**
14
     *  For users with reset token to allow user to reset their password
15
     */
16
    public function __invoke(Request $request)
17
    {
18
        // If the user is trying to visit the page without a token or email address, show 404 error
19
        if(empty($request->token) || empty($request->email))
20
        {
21
            abort(404);
22
        }
23
24
        return Inertia::render('Auth/password/reset', [
25
            'token' => $request->token,
26
            'email' => $request->email,
27
        ]);
28
    }
29
}
30