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

UserController::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
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