ResetPasswordController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
c 0
b 0
f 0
dl 0
loc 38
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A redirectTo() 0 3 1
1
<?php
2
3
namespace Chuckbe\Chuckcms\Controllers\Auth;
4
5
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
6
use Illuminate\Foundation\Auth\ResetsPasswords;
0 ignored issues
show
Bug introduced by
The type Illuminate\Foundation\Auth\ResetsPasswords was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use Illuminate\Foundation\Bus\DispatchesJobs;
8
use Illuminate\Foundation\Validation\ValidatesRequests;
9
use Illuminate\Routing\Controller as BaseController;
10
11
class ResetPasswordController extends BaseController
12
{
13
    /*
14
    |--------------------------------------------------------------------------
15
    | Password Reset Controller
16
    |--------------------------------------------------------------------------
17
    |
18
    | This controller is responsible for handling password reset requests
19
    | and uses a simple trait to include this behavior. You're free to
20
    | explore this trait and override any methods you wish to tweak.
21
    |
22
    */
23
24
    use AuthorizesRequests;
25
    use DispatchesJobs;
26
    use ValidatesRequests;
27
    use ResetsPasswords;
28
29
    /**
30
     * Where to redirect users after resetting their password.
31
     *
32
     * @var string
33
     */
34
    protected $redirectTo = '/dashboard';
35
36
    protected function redirectTo()
37
    {
38
        return '/'.Auth::user()->roles()->first()->redirect;
0 ignored issues
show
Bug introduced by
The type Chuckbe\Chuckcms\Controllers\Auth\Auth was not found. Did you mean Auth? If so, make sure to prefix the type with \.
Loading history...
39
    }
40
41
    /**
42
     * Create a new controller instance.
43
     *
44
     * @return void
45
     */
46
    public function __construct()
47
    {
48
        $this->middleware('guest');
49
    }
50
}
51