We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 3 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3.0987 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | 10 | public function createValidator(MetadataFactory $metadataFactory): ValidatorInterface |
|
27 | { |
||
28 | 10 | $builder = Validation::createValidatorBuilder() |
|
29 | 10 | ->setMetadataFactory($metadataFactory) |
|
30 | ; |
||
31 | |||
32 | 10 | if (null !== $this->constraintValidatorFactory) { |
|
33 | 10 | $builder->setConstraintValidatorFactory($this->constraintValidatorFactory); |
|
34 | } |
||
35 | |||
36 | 10 | if (null !== $this->defaultTranslator) { |
|
37 | $builder |
||
38 | ->setTranslator($this->defaultTranslator) |
||
39 | ->setTranslationDomain('validators'); |
||
40 | } |
||
41 | |||
42 | 10 | return $builder->getValidator(); |
|
43 | } |
||
45 |