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

UpdatePasswordRequest::rules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 10
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