| Conditions | 3 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function create(Form $component): FormBuilderInterface |
||
| 34 | { |
||
| 35 | $builder = $this->formFactory->createBuilder($component->getFormType()); |
||
| 36 | if (!($currentAction = $builder->getAction()) || $currentAction === '') { |
||
| 37 | $action = $this->router->generate( |
||
| 38 | 'api_forms_post_item', |
||
| 39 | [ |
||
| 40 | 'id' => $component->getId() |
||
| 41 | ] |
||
| 42 | ); |
||
| 43 | $builder->setAction($action); |
||
| 44 | } |
||
| 45 | return $builder; |
||
| 46 | } |
||
| 48 |