Completed
Push — master ( 41a1c8...e65970 )
by Mohamed
03:30 queued 15s
created

ForgotPasswordController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 40
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A showLinkRequestForm() 0 4 1
A sendResetLinkResponse() 0 7 1
1
<?php
2
3
namespace Microboard\Http\Controllers\Auth;
4
5
use Illuminate\Http\JsonResponse;
6
use Illuminate\Http\Request;
7
use Microboard\Http\Controllers\Controller;
8
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
9
10
class ForgotPasswordController extends Controller
11
{
12
    /*
13
    |--------------------------------------------------------------------------
14
    | Password Reset Controller
15
    |--------------------------------------------------------------------------
16
    |
17
    | This controller is responsible for handling password reset emails and
18
    | includes a trait which assists in sending these notifications from
19
    | your application to your users. Feel free to explore this trait.
20
    |
21
    */
22
23
    use SendsPasswordResetEmails;
24
25
    /**
26
     * Display the form to request a password reset link.
27
     *
28
     * @return \Illuminate\View\View
29
     */
30
    public function showLinkRequestForm()
31
    {
32
        return view('microboard::auth.passwords.email');
33
    }
34
35
    /**
36
     * Get the response for a successful password reset link.
37
     *
38
     * @param  \Illuminate\Http\Request  $request
39
     * @param  string  $response
40
     * @return \Illuminate\Http\RedirectResponse
41
     */
42
    protected function sendResetLinkResponse(Request $request, $response)
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
43
    {
44
        return back()->with('alert', [
45
            'type' => 'success',
46
            'text' => trans($response)
47
        ]);
48
    }
49
}
50