Passed
Push — master ( c21d64...956340 )
by Arthur
05:06
created

UserController   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 64
Duplicated Lines 0 %

Test Coverage

Coverage 16.66%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 64
ccs 2
cts 12
cp 0.1666
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A index() 0 3 1
A create() 0 3 1
A store() 0 3 1
A destroy() 0 3 1
A show() 0 3 1
A update() 0 3 1
1
<?php
2
3
namespace Modules\User\Http\Controllers;
4
5
use Illuminate\Http\JsonResponse;
6
use Illuminate\Http\Request;
7
use Illuminate\Routing\Controller;
8
9
class UserController extends Controller
10
{
11
    /**
12
     * Display a listing of the resource.
13
     *
14
     * @return JsonResponse
15
     */
16
    public function index()
17
    {
18
        return \response()->json();
19
    }
20
21
    /**
22
     * Show the form for creating a new resource.
23
     *
24
     * @return JsonResponse
25
     */
26
    public function create()
27
    {
28
        return \response()->json();
29
    }
30
31
    /**
32
     * Store a newly created resource in storage.
33
     *
34
     * @param Request $request
35
     *
36
     * @return JsonResponse
37
     */
38
    public function store(Request $request)
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

38
    public function store(/** @scrutinizer ignore-unused */ Request $request)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
39
    {
40
        return \response()->json();
41
    }
42
43
    /**
44
     * Show the specified resource.
45
     *
46
     * @return JsonResponse
47
     */
48 1
    public function show()
49
    {
50 1
        return \response()->json(\Auth::user()->toArray());
51
    }
52
53
    /**
54
     * Update the specified resource in storage.
55
     *
56
     * @param Request $request
57
     *
58
     * @return JsonResponse
59
     */
60
    public function update(Request $request)
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

60
    public function update(/** @scrutinizer ignore-unused */ Request $request)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
61
    {
62
        return \response()->json();
63
    }
64
65
    /**
66
     * Remove the specified resource from storage.
67
     *
68
     * @return JsonResponse
69
     */
70
    public function destroy()
71
    {
72
        return \response()->json();
73
    }
74
}
75