| Conditions | 4 |
| Paths | 4 |
| Total Lines | 21 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function process(FormRuleProcessorContext $processContext, FormRuleContextBuilder $formRuleContext) |
||
| 21 | { |
||
| 22 | $constraints = $processContext->getConstraints(); |
||
| 23 | $form = $processContext->getForm(); |
||
| 24 | |||
| 25 | $collection = new RuleCollection(); |
||
| 26 | foreach ($this->mappers as $mapper) { |
||
| 27 | foreach ($constraints as $constraint) { |
||
| 28 | if (!$mapper->supports($constraint, $form)) { |
||
| 29 | continue; |
||
| 30 | } |
||
| 31 | |||
| 32 | $mapper->resolve($constraint, $form, $collection); |
||
| 33 | } |
||
| 34 | } |
||
| 35 | |||
| 36 | $formRuleContext->add( |
||
| 37 | $processContext->getView(), |
||
| 38 | $collection |
||
| 39 | ); |
||
| 40 | } |
||
| 41 | |||
| 47 |