Completed
Push — master ( 3ae4c0...4ead59 )
by Valentyn
02:15
created

ChangePasswordRequest::rules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
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 ChangePasswordRequest extends BaseRequest
9
{
10
    public function rules()
11
    {
12
        return new Assert\Collection([
13
            'old_password' => new Assert\Length(['min' => 4, 'max' => 4096]),
14
            'new_password' => new Assert\Length(['min' => 4, 'max' => 4096]),
15
        ]);
16
    }
17
}
18