Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
23 | 3 | public function resolve(Constraint $constraint, FormInterface $form, RuleCollection $collection) |
|
24 | { |
||
25 | 3 | if (!$this->supports($constraint, $form)) { |
|
26 | 2 | throw new LogicException(); |
|
27 | } |
||
28 | |||
29 | /** @var Email $constraint */ |
||
30 | 1 | $collection->set( |
|
31 | 1 | self::RULE_NAME, |
|
32 | 1 | new ConstraintRule( |
|
33 | 1 | self::RULE_NAME, |
|
34 | 1 | true, |
|
35 | 1 | new RuleMessage($constraint->message), |
|
36 | 1 | $constraint->groups |
|
37 | 1 | ) |
|
38 | 1 | ); |
|
39 | 1 | } |
|
40 | |||
46 |