GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

ResetPasswordController::rules()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
namespace Pterodactyl\Http\Controllers\Auth;
4
5
use Pterodactyl\Models\User;
6
use Pterodactyl\Http\Controllers\Controller;
7
use Illuminate\Foundation\Auth\ResetsPasswords;
8
9
class ResetPasswordController extends Controller
10
{
11
    /*
12
    |--------------------------------------------------------------------------
13
    | Password Reset Controller
14
    |--------------------------------------------------------------------------
15
    |
16
    | This controller is responsible for handling password reset requests
17
    | and uses a simple trait to include this behavior. You're free to
18
    | explore this trait and override any methods you wish to tweak.
19
    |
20
    */
21
22
    use ResetsPasswords;
23
24
    /**
25
     * The URL to redirect users to after password reset.
26
     *
27
     * @var string
28
     */
29
    public $redirectTo = '/';
30
31
    /**
32
     * Create a new controller instance.
33
     *
34
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
35
     */
36
    public function __construct()
37
    {
38
        $this->middleware('guest');
39
    }
40
41
    /**
42
     * Return the rules used when validating password reset.
43
     *
44
     * @return array
45
     */
46
    protected function rules()
47
    {
48
        return [
49
            'token' => 'required',
50
            'email' => 'required|email',
51
            'password' => 'required|confirmed|' . User::PASSWORD_RULES,
52
        ];
53
    }
54
}
55