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