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