Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
42 | public function getEntityValidator(): EntityValidatorInterface |
||
43 | { |
||
44 | $builder = Validation::createValidatorBuilder(); |
||
45 | $builder->addMethodMapping(self::METHOD_LOAD_VALIDATOR_META_DATA); |
||
46 | $builder->setMetadataCache($this->doctrineCache); |
||
47 | $validator = $builder->getValidator(); |
||
48 | $entityValidator = new EntityValidator(); |
||
49 | $entityValidator->setValidator($validator); |
||
50 | |||
51 | return $entityValidator; |
||
52 | } |
||
54 |