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

UpdateEmailRequest::rules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
namespace Xetaravel\Http\Requests\User;
4
5
use Illuminate\Foundation\Http\FormRequest;
6
7
class UpdateEmailRequest extends FormRequest
8
{
9
    /**
10
     * Get the validation rules that apply to the request.
11
     *
12
     * @return array
13
     */
14
    public function rules(): array
15
    {
16
        return [
17
            'email' => 'required|email|max:50||unique:users,email,' . $this->user()->id
18
        ];
19
    }
20
}
21