| Total Complexity | 4 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class IntegerFactory implements TranslatableFactoryInterface |
||
| 11 | { |
||
| 12 | use FactoryTrait; |
||
| 13 | |||
| 14 | const TYPE = 'integer'; |
||
| 15 | const TYPE_ALT = 'int'; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @inheritdoc |
||
| 19 | */ |
||
| 20 | 1 | public function create(SymfonyConstraint $constraint): Constraint |
|
| 21 | { |
||
| 22 | /** @var Assert\Type $constraint */ |
||
| 23 | |||
| 24 | 1 | return new ParsleyAssert\Integer([ |
|
| 25 | 1 | 'message' => $this->trans($constraint->message, ['{{ type }}' => static::TYPE]), |
|
| 26 | ]); |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @inheritdoc |
||
| 31 | */ |
||
| 32 | 1 | public function supports(SymfonyConstraint $constraint): bool |
|
| 36 | ; |
||
| 37 | } |
||
| 39 |