Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | public function handleExceptionAction(Request $request, \Exception $exception) |
||
|
|||
31 | { |
||
32 | // The templates for showing exceptions are outside of the normal application |
||
33 | // template path. It is therefore necessary to specify the path here. |
||
34 | $this->get('php_template_engine')->addPath( |
||
35 | __DIR__ . '/../Resources/Exception' |
||
36 | ); |
||
37 | |||
38 | // Render the template |
||
39 | $response = $this->get('php_template_engine')->render('TextHtml.html.php', array( |
||
40 | 'code' => $exception->getCode(), |
||
41 | 'file' => $exception->getFile(), |
||
42 | 'line' => $exception->getLine(), |
||
43 | 'trace' => $exception->getTrace(), |
||
44 | 'message' => $exception->getMessage(), |
||
45 | 'type' => get_class($exception) |
||
46 | )); |
||
47 | |||
48 | return new Response($response); |
||
49 | } |
||
50 | } |
||
51 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.