Completed
Push — master ( dfe268...3e25db )
by Brian
15s queued 12s
created

ProfileUpdateRequest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 12
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A rules() 0 5 1
1
<?php
2
3
namespace App\Modules\Sellers\Http\Requests;
4
5
use App\Modules\Sellers\Models\Seller;
6
use Illuminate\Foundation\Http\FormRequest;
7
use Illuminate\Validation\Rule;
8
9
class ProfileUpdateRequest extends FormRequest
10
{
11
    /**
12
     * Get the validation rules that apply to the request.
13
     *
14
     * @return array<string, \Illuminate\Contracts\Validation\Rule|array|string>
15
     */
16 2
    public function rules(): array
17
    {
18 2
        return [
19 2
            'name' => ['string', 'max:255'],
20 2
            'email' => ['email', 'max:255', Rule::unique(Seller::class)->ignore($this->user('seller')->id)],
21 2
        ];
22
    }
23
}
24