| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function resolve(Constraint $constraint, FormInterface $form, RuleCollection $collection) |
||
| 34 | { |
||
| 35 | if (!$this->supports($constraint, $form)) { |
||
| 36 | throw new LogicException(); |
||
| 37 | } |
||
| 38 | |||
| 39 | /** @var \Symfony\Component\Validator\Constraints\Regex $constraint */ |
||
| 40 | $collection->set( |
||
| 41 | self::RULE_NAME, |
||
| 42 | new ConstraintRule( |
||
| 43 | self::RULE_NAME, |
||
| 44 | $constraint->getHtmlPattern(), |
||
| 45 | new RuleMessage($constraint->message), |
||
| 46 | $constraint->groups |
||
| 47 | ) |
||
| 48 | ); |
||
| 49 | } |
||
| 50 | |||
| 56 |