Completed
Pull Request — master (#37)
by Tim
02:41
created

CustomerValidator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 1 Features 1
Metric Value
wmc 2
c 1
b 1
f 1
lcom 0
cbo 1
dl 0
loc 33
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A authorize() 0 4 1
A rules() 0 15 1
1
<?php
2
3
namespace App\Http\Requests;
4
5
use App\Http\Requests\Request;
6
7
/**
8
 * Class CustomerValidator
9
 * @package App\Http\Requests
10
 */
11
class CustomerValidator extends Request
12
{
13
    /**
14
     * Determine if the user is authorized to make this request.
15
     *
16
     * @return bool
17
     */
18
    public function authorize()
19
    {
20
        return true;
21
    }
22
23
    /**
24
     * Get the validation rules that apply to the request.
25
     *
26
     * @return array
27
     */
28
    public function rules()
29
    {
30
        return [
31
            'company' => 'required',
32
            'fname'   => 'required',
33
            'name'    => 'required',
34
            'address' => 'required',
35
            'zipcode' => 'required',
36
            'city'    => 'required',
37
            'country' => 'required',
38
            'phone'   => 'required',
39
            'email'   => 'required|email',
40
            'vat'     => 'required',
41
        ];
42
    }
43
}
44