1 | <?php |
||
18 | class ErrorController extends Controller |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * The exception object |
||
23 | * |
||
24 | * @var \Exception |
||
25 | */ |
||
26 | private $_exception; |
||
27 | |||
28 | /** |
||
29 | * ErrorController constructor. |
||
30 | * |
||
31 | * @param Request $request The request object |
||
32 | * @param \Exception $e The given exception |
||
33 | * |
||
34 | * @codeCoverageIgnore |
||
35 | */ |
||
36 | public function __construct(Request $request, $e) |
||
41 | |||
42 | /** |
||
43 | * Decide if debug output or 404 page should be rendered |
||
44 | * |
||
45 | * @return Response |
||
46 | * |
||
47 | * @codeCoverageIgnore |
||
48 | */ |
||
49 | public function displayError() |
||
57 | |||
58 | /** |
||
59 | * Render the debug output |
||
60 | * |
||
61 | * @return Response |
||
62 | * |
||
63 | * @codeCoverageIgnore |
||
64 | */ |
||
65 | private function _renderDebugPage() |
||
97 | |||
98 | /** |
||
99 | * Render a 404 page |
||
100 | * |
||
101 | * @return Response |
||
102 | */ |
||
103 | private function _renderNotFoundPage() |
||
117 | |||
118 | } |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.