| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 6 |
| Ratio | 35.29 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | public function html(Request $request, Response $response, Admin $app, EntityInterface $entity) |
||
|
|
|||
| 14 | { |
||
| 15 | $form = static::createForm($entity, $app); |
||
| 16 | $form->loadFromPsr7($request); |
||
| 17 | |||
| 18 | View Code Duplication | if ($form->isValid()) { |
|
| 19 | return new RedirectResponse($app->getRoute('read', [ |
||
| 20 | 'entity' => $entity->getName(), |
||
| 21 | 'id' => $entity->create($form['data']->val()), |
||
| 22 | ])); |
||
| 23 | } |
||
| 24 | |||
| 25 | return $app['templates']->render('pages/create', [ |
||
| 26 | 'entity' => $entity, |
||
| 27 | 'form' => $form, |
||
| 28 | ]); |
||
| 29 | } |
||
| 30 | } |
||
| 31 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.