Total Complexity | 2 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class EmailFactory implements TranslatableFactoryInterface |
||
11 | { |
||
12 | use FactoryTrait; |
||
13 | |||
14 | /** |
||
15 | * @inheritdoc |
||
16 | */ |
||
17 | 1 | public function create(SymfonyConstraint $constraint): Constraint |
|
18 | { |
||
19 | /** @var Assert\Email $constraint */ |
||
20 | |||
21 | 1 | return new ParsleyAssert\Email([ |
|
22 | 1 | 'message' => $this->trans($constraint->message), |
|
23 | ]); |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * @inheritdoc |
||
28 | */ |
||
29 | 1 | public function supports(SymfonyConstraint $constraint): bool |
|
32 | } |
||
33 | } |
||
34 |