Conditions | 1 |
Paths | 1 |
Total Lines | 8 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
33 | 3 | $form = $this->createNamedForm('comment', CommentType::class, $comment); |
|
34 | 3 | $form->submit($request->request->get('comment')); |
|
35 | |||
36 | 3 | if ($form->isValid()) { |
|
37 | 1 | $this->getDoctrine()->getManager()->persist($comment); |
|
38 | 1 | $this->getDoctrine()->getManager()->flush(); |
|
39 | |||
40 | 1 | return ['comment' => $comment]; |
|
41 | } |
||
46 |