ResetPasswordController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 46
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A showResetForm() 0 4 1
1
<?php
2
3
namespace Yeelight\Http\Controllers\BackendAuth;
4
5
use Illuminate\Foundation\Auth\ResetsPasswords;
6
use Illuminate\Http\Request;
7
use Yeelight\Http\Controllers\BaseController;
8
9
/**
10
 * Class ResetPasswordController
11
 *
12
 * @category Yeelight
13
 *
14
 * @package Yeelight\Http\Controllers\BackendAuth
15
 *
16
 * @author Sheldon Lee <[email protected]>
17
 *
18
 * @license https://opensource.org/licenses/MIT MIT
19
 *
20
 * @link https://www.yeelight.com
21
 */
22
class ResetPasswordController extends BaseController
23
{
24
    /*
25
    |--------------------------------------------------------------------------
26
    | Password Reset Controller
27
    |--------------------------------------------------------------------------
28
    |
29
    | This controller is responsible for handling password reset requests
30
    | and uses a simple trait to include this behavior. You're free to
31
    | explore this trait and override any methods you wish to tweak.
32
    |
33
    */
34
35
    use ResetsPasswords;
0 ignored issues
show
Bug introduced by
The trait Illuminate\Foundation\Auth\ResetsPasswords requires the property $email which is not provided by Yeelight\Http\Controller...ResetPasswordController.
Loading history...
36
37
    /**
38
     * Where to redirect users after resetting their password.
39
     *
40
     * @var string
41
     */
42
    protected $redirectTo = '/';
43
44
    /**
45
     * Create a new controller instance.
46
     *
47
     * @return void
48
     */
49
    public function __construct()
50
    {
51
        $this->middleware('guest');
52
    }
53
54
    /**
55
     * Display the password reset view for the given token.
56
     *
57
     * If no token is present, display the link request form.
58
     *
59
     * @param \Illuminate\Http\Request $request Request
60
     * @param string|null $token token
61
     *
62
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
63
     */
64
    public function showResetForm(Request $request, $token = null)
65
    {
66
        return view('angulr.auth.passwords.reset')->with(
0 ignored issues
show
Bug introduced by
The method with() does not exist on Illuminate\Contracts\View\Factory. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

66
        return view('angulr.auth.passwords.reset')->/** @scrutinizer ignore-call */ with(

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
67
            ['token' => $token, 'email' => $request->email]
68
        );
69
    }
70
}
71