Completed
Push — master ( 5163a0...712d21 )
by Valentyn
06:59
created

SearchRequest::rules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
crap 1
1
<?php
2
3
namespace App\Movies\Request;
4
5
use App\Request\BaseRequest;
6
use Symfony\Component\Validator\Constraints as Assert;
7
8
class SearchRequest extends BaseRequest
9
{
10 2
    public function rules()
11
    {
12 2
        return new Assert\Collection([
13 2
            'query' => [new Assert\NotBlank(), new Assert\Length(['min' => 2, 'max' => 100])],
14
        ]);
15
    }
16
}