1 | <?php |
||
13 | class NewsController extends Controller |
||
14 | { |
||
15 | /** |
||
16 | * Display a listing of the resource. |
||
17 | * |
||
18 | * @return \Illuminate\Http\Response |
||
19 | */ |
||
20 | public function index() |
||
30 | |||
31 | /** |
||
32 | * Show the form for creating a new resource. |
||
33 | * |
||
34 | * @return \Illuminate\Http\Response |
||
35 | */ |
||
36 | public function create() |
||
40 | |||
41 | /** |
||
42 | * Store a newly created resource in storage. |
||
43 | * |
||
44 | * @param \Illuminate\Http\Request $request |
||
45 | * @return \Illuminate\Http\Response |
||
46 | */ |
||
47 | public function store(Request $request) |
||
68 | |||
69 | /** |
||
70 | * Display the specified resource. |
||
71 | * |
||
72 | * @param string $slug |
||
73 | * @return \Illuminate\Http\Response |
||
74 | */ |
||
75 | public function show($slug) |
||
80 | |||
81 | /** |
||
82 | * Show the form for editing the specified resource. |
||
83 | * |
||
84 | * @param int $id |
||
85 | * @return \Illuminate\Http\Response |
||
86 | */ |
||
87 | public function edit($id) |
||
93 | |||
94 | /** |
||
95 | * Update the specified resource in storage. |
||
96 | * |
||
97 | * @param \Illuminate\Http\Request $request |
||
98 | * @param int $id |
||
99 | * @return \Illuminate\Http\Response |
||
100 | */ |
||
101 | public function update(Request $request, $id) |
||
121 | |||
122 | /** |
||
123 | * Remove the specified resource from storage. |
||
124 | * |
||
125 | * @param int $id |
||
126 | * @return \Illuminate\Http\Response |
||
127 | */ |
||
128 | public function destroy($id) |
||
138 | } |
||
139 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.