StoreRecipientRequest::rules()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 11
rs 9.9666
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Squareetlabs\VeriFactu\Http\Requests;
6
7
use Illuminate\Foundation\Http\FormRequest;
8
9
class StoreRecipientRequest extends FormRequest
10
{
11
    public function authorize(): bool
12
    {
13
        return true;
14
    }
15
16
    public function rules(): array
17
    {
18
        return [
19
            'invoice_id' => ['required', 'exists:invoices,id'],
20
            'name' => ['required', 'string', 'max:120'],
21
            'tax_id' => ['required', 'string', 'max:20'],
22
            'country' => ['nullable', 'string', 'size:2'],
23
            'address' => ['nullable', 'string', 'max:255'],
24
            'email' => ['nullable', 'email', 'max:120'],
25
            'phone' => ['nullable', 'string', 'max:30'],
26
            'type' => ['nullable', 'string', 'max:10'],
27
        ];
28
    }
29
}