| Total Complexity | 5 |
| Total Lines | 58 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class ClientController extends Controller |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Display a listing of the resource. |
||
| 12 | * |
||
| 13 | * @return LearningLocker |
||
| 14 | */ |
||
| 15 | public function index() |
||
| 16 | { |
||
| 17 | return LearningLocker::clients()->get(); |
||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Display the specified resource. |
||
| 22 | * |
||
| 23 | * @param int $id |
||
| 24 | * @return LearningLocker |
||
| 25 | */ |
||
| 26 | public function show($id) |
||
| 27 | { |
||
| 28 | $select = ["_id"]; |
||
| 29 | return LearningLocker::client($id)->get($select); |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Store a newly created resource in storage. |
||
| 34 | * |
||
| 35 | * @param \Illuminate\Http\Request $request |
||
| 36 | * @return LearningLocker |
||
| 37 | */ |
||
| 38 | public function save(Request $request) |
||
|
|
|||
| 39 | { |
||
| 40 | $data = request()->all(); |
||
| 41 | return LearningLocker::client()->create($data); |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Update the specified resource in storage. |
||
| 46 | * |
||
| 47 | * @param \Illuminate\Http\Request $request |
||
| 48 | * @param int $id |
||
| 49 | * @return LearningLocker |
||
| 50 | */ |
||
| 51 | public function update(Request $request, $id) |
||
| 52 | { |
||
| 53 | $data = request()->all(); |
||
| 54 | return LearningLocker::client($id)->update($data); |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Remove the specified resource from storage. |
||
| 59 | * |
||
| 60 | * @param int $id |
||
| 61 | * @return LearningLocker |
||
| 62 | */ |
||
| 63 | public function destroy($id) |
||
| 66 | } |
||
| 67 | |||
| 68 | } |
||
| 69 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.