Conditions | 3 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
22 | 3 | #[Route(path: '/form', name: self::class)] |
|
23 | public function __invoke(Request $request): Response |
||
24 | { |
||
25 | 3 | $dto = new RegisterFormDto(); |
|
26 | 3 | $form = $this->createForm(RegisterForm::class, $dto)->handleRequest($request); |
|
27 | 3 | if ($form->isSubmitted() && $form->isValid()) { |
|
28 | // just for the example, the DTO has already been updated at this point |
||
29 | 1 | $dto = $form->getData(); |
|
30 | } |
||
31 | |||
32 | 3 | return $this->render(self::class.'.html.twig', [ |
|
33 | 3 | 'form' => $form, |
|
34 | 3 | 'dto' => $dto, |
|
35 | 3 | ]); |
|
38 |