Passed
Push — dependabot/npm_and_yarn/string... ( b56eb5...bc569b )
by
unknown
45:46 queued 33s
created

ForgotPasswordController   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Test Coverage

Coverage 71.43%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 33
ccs 5
cts 7
cp 0.7143
rs 10
c 0
b 0
f 0
wmc 3
1
<?php
2
3
namespace Thinktomorrow\Chief\App\Http\Controllers\Auth;
4
5
use Thinktomorrow\Chief\App\Http\Controllers\Controller;
6
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
7
use Thinktomorrow\Chief\Authorization\ChiefPasswordBrokerResolver;
8
9
class ForgotPasswordController extends Controller
10
{
11
    /*
12
    |--------------------------------------------------------------------------
13
    | Password Reset Controller
14
    |--------------------------------------------------------------------------
15
    |
16
    | This controller is responsible for handling password reset emails and
17
    | includes a trait which assists in sending these notifications from
18
    | your application to your users. Feel free to explore this trait.
19
    |
20
    */
21
22
    use SendsPasswordResetEmails;
23
24
    /**
25
     * Create a new controller instance.
26
     *
27
     * @return void
28
     */
29
    public function __construct()
30
    {
31
        $this->middleware('chief-guest');
32
    }
33
34
    public function showLinkRequestForm()
35
    {
36
        return view('chief::auth.passwords.email');
37
    }
38
39
    protected function broker()
40
    {
41
        return (new ChiefPasswordBrokerResolver(app()))->resolve();
42
    }
43
}
44