1 | <?php |
||
12 | class DeviceController extends Controller |
||
13 | { |
||
14 | /** |
||
15 | * Create a new controller instance. |
||
16 | * |
||
17 | */ |
||
18 | public function __construct() |
||
24 | |||
25 | /** |
||
26 | * Display index page and process dataTable ajax request. |
||
27 | * |
||
28 | * @param \App\DataTables\DevicesDataTable $dataTable |
||
29 | * @return \Illuminate\Http\JsonResponse|\Illuminate\View\View |
||
30 | */ |
||
31 | public function index(DevicesDataTable $dataTable) |
||
35 | |||
36 | /** |
||
37 | * Show create device page. |
||
38 | * |
||
39 | * @return \BladeView|bool|\Illuminate\Contracts\View\Factory|\Illuminate\View\View |
||
40 | */ |
||
41 | public function create() |
||
45 | |||
46 | /** |
||
47 | * Show the given device. |
||
48 | * |
||
49 | * @param Request $request |
||
50 | * @param string $id |
||
51 | * @return \BladeView|bool|\Illuminate\Contracts\View\Factory|\Illuminate\View\View |
||
52 | */ |
||
53 | public function show(Request $request, $id) |
||
59 | |||
60 | /** |
||
61 | * View the edit device page. |
||
62 | * |
||
63 | * @param Request $request |
||
64 | * @param string $id |
||
65 | * @return \BladeView|bool|\Illuminate\Contracts\View\Factory|\Illuminate\View\View |
||
66 | */ |
||
67 | public function edit(Request $request, $id) |
||
78 | |||
79 | /** |
||
80 | * Update the given device. |
||
81 | * |
||
82 | * @param Request $request |
||
83 | * @param string $id |
||
84 | * @return Response |
||
85 | */ |
||
86 | public function update(Request $request, $id) |
||
142 | |||
143 | /** |
||
144 | * Deletes a device. |
||
145 | * |
||
146 | * @param Request $request |
||
147 | * @param string $id |
||
148 | * @return Response |
||
149 | */ |
||
150 | public function destroy(Request $request, $id) |
||
174 | |||
175 | /** |
||
176 | * Confirms deletion of a device. |
||
177 | * |
||
178 | * @param Request $request |
||
179 | * @param string $id |
||
180 | * @return Response |
||
181 | */ |
||
182 | public function remove(Request $request, $id) |
||
188 | |||
189 | /** |
||
190 | * If a site is not connected to a device then delete the site |
||
191 | * |
||
192 | * @param int $oldLocationID |
||
193 | */ |
||
194 | private function removeUnusedSite($oldLocationID) |
||
204 | } |
||
205 |
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.