Completed
Push — master ( a0d489...a6481d )
by Fèvre
02:12
created

AccountValidator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 22
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A update() 0 12 1
1
<?php
2
namespace Xetaravel\Models\Validators;
3
4
use Illuminate\Support\Facades\Validator as FacadeValidator;
5
use Illuminate\Validation\Validator;
6
7
class AccountValidator
8
{
9
    /**
10
     * Get a validator for an incoming update request.
11
     *
12
     * @param array $data The data to validate.
13
     *
14
     * @return \Illuminate\Validation\Validator
15
     */
16
    public static function update(array $data): Validator
17
    {
18
        $rules = [
19
            'first_name' => 'max:100',
20
            'last_name' => 'max:100',
21
            'avatar' => 'image',
22
            'facebook' => 'max:50',
23
            'twitter' => 'max:50'
24
        ];
25
26
        return FacadeValidator::make($data, $rules);
27
    }
28
}
29