Total Complexity | 8 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | final class ValidatorFactory implements ValidatorFactoryInterface |
||
10 | { |
||
11 | 2 | public function __construct() { |
|
12 | 2 | } |
|
13 | |||
14 | 2 | public function create(array $rules): ValidatorInterface |
|
15 | { |
||
16 | 2 | return new Validator($this->normalizeRules($rules)); |
|
17 | } |
||
18 | |||
19 | 2 | private function normalizeRules(array $rules) |
|
28 | } |
||
29 | |||
30 | /** |
||
31 | * @param callable|Rule $rule |
||
32 | */ |
||
33 | 2 | private function normalizeRule($rule): Rule |
|
46 | } |
||
47 | } |
||
48 |