Completed
Push — master ( d15cf4...5163a0 )
by Valentyn
06:05
created

MovieTranslationRules   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getDefaultRules() 0 9 1
1
<?php
2
3
namespace App\Movies\Validation;
4
5
use Symfony\Component\Validator\Constraints as Assert;
6
7
class MovieTranslationRules
8
{
9 3
    public static function getDefaultRules(): array
10
    {
11
        return [
12 3
            'locale' => [new Assert\NotBlank(), new Assert\Locale()],
13 3
            'title' => [new Assert\NotBlank(), new Assert\Length(['min' => 3, 'max' => 50])],
14 3
            'posterUrl' => [new Assert\NotBlank(), new Assert\Length(['min' => 10, 'max' => 255])],
15 3
            'overview' => [new Assert\NotBlank(), new Assert\Length(['min' => 50])],
16
        ];
17
    }
18
}