Passed
Push — 5.0.0 ( f10804...44b42e )
by Fèvre
15:04 queued 07:40
created

UpdatePasswordRequest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 13
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A rules() 0 6 1
1
<?php
2
3
namespace Xetaravel\Http\Requests\User;
4
5
use Illuminate\Foundation\Http\FormRequest;
6
use Illuminate\Validation\Rules;
7
8
class UpdatePasswordRequest extends FormRequest
9
{
10
    /**
11
     * Get the validation rules that apply to the request.
12
     *
13
     * @return array
14
     */
15
    public function rules(): array
16
    {
17
        return [
18
            'current_password' => 'required|password',
19
            'password' => ['required', 'confirmed', Rules\Password::defaults()],
20
            'password_confirmation' => 'required|same:password'
21
        ];
22
    }
23
}
24