1 | <?php |
||
8 | class MonitorController extends Controller |
||
9 | { |
||
10 | /** |
||
11 | * Display a listing of the resource. |
||
12 | * |
||
13 | * @return \Illuminate\Http\Response |
||
14 | */ |
||
15 | public function index() |
||
19 | |||
20 | /** |
||
21 | * Store a newly created resource in storage. |
||
22 | * |
||
23 | * @param \Illuminate\Http\Request $request |
||
24 | * @return \Illuminate\Http\Response |
||
25 | */ |
||
26 | public function store(Request $request) |
||
39 | |||
40 | /** |
||
41 | * Display the specified resource. |
||
42 | * |
||
43 | * @param int $id |
||
44 | * @return \Illuminate\Http\Response |
||
45 | */ |
||
46 | public function show($id) |
||
50 | |||
51 | /** |
||
52 | * Update the specified resource in storage. |
||
53 | * |
||
54 | * @param \Illuminate\Http\Request $request |
||
55 | * @param int $id |
||
56 | * @return \Illuminate\Http\Response |
||
57 | */ |
||
58 | public function update(Request $request, $id) |
||
66 | |||
67 | /** |
||
68 | * Remove the specified resource from storage. |
||
69 | * |
||
70 | * @param int $id |
||
71 | * @return \Illuminate\Http\Response |
||
72 | */ |
||
73 | public function destroy($id) |
||
78 | } |
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.