StoreRecipientRequest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 11
c 1
b 0
f 0
dl 0
loc 18
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A authorize() 0 3 1
A rules() 0 11 1
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
}