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 |
||
| 26 | 10 | public function createValidator(MetadataFactory $metadataFactory): ValidatorInterface |
|
| 27 | { |
||
| 28 | 10 | $builder = Validation::createValidatorBuilder() |
|
| 29 | 10 | ->setMetadataFactory($metadataFactory) |
|
| 30 | 10 | ->setConstraintValidatorFactory($this->constraintValidatorFactory) |
|
| 31 | ; |
||
| 32 | |||
| 33 | 10 | if (null !== $this->defaultTranslator) { |
|
| 34 | $builder |
||
| 35 | ->setTranslator($this->defaultTranslator) |
||
| 36 | ->setTranslationDomain('validators'); |
||
| 37 | } |
||
| 38 | |||
| 39 | 10 | return $builder->getValidator(); |
|
| 40 | } |
||
| 42 |