Completed
Push — master ( 50cc67...a8ce2f )
by Valentyn
03:46
created

UpdateUserRequest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 5
dl 0
loc 15
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A rules() 0 12 1
1
<?php
2
3
namespace App\Users\Request;
4
5
use App\Request\BaseRequest;
6
use Symfony\Component\Validator\Constraints as Assert;
7
8
class UpdateUserRequest extends BaseRequest
9
{
10
    public function rules()
11
    {
12
        return new Assert\Collection([
13
            'profile' => new Assert\Collection([
14
                'first_name' => new Assert\Length(['min' => 2, 'max' => 50]),
15
                'last_name' => new Assert\Length(['min' => 2, 'max' => 50]),
16
                'birth_date' => new Assert\Date(),
17
                'about' => new Assert\Length(['max' => 255]),
18
                'public_email' => new Assert\Email(),
19
            ]),
20
        ]);
21
    }
22
}
23