Passed
Pull Request — master (#408)
by
unknown
02:42
created

ValidatorFactory::make()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Validator\Tests\Support;
6
7
use Yiisoft\Validator\SimpleRuleHandlerContainer;
8
use Yiisoft\Validator\Validator;
9
10
final class ValidatorFactory
11
{
12
    public static function make(): Validator
13
    {
14
        $translator = (new TranslatorFactory())->create();
15
        return new Validator(new SimpleRuleHandlerContainer(), $translator);
16
    }
17
}
18