Completed
Push — master ( f2f6fa...1beb9c )
by claudio
03:43
created

EmployeesController::store()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
ccs 0
cts 3
cp 0
rs 9.4286
cc 1
eloc 1
nc 1
nop 2
crap 2
1
<?php
2
3
namespace plunner\Http\Controllers\Companies\Groups;
4
5
use Illuminate\Http\Request;
6
use plunner\Company;
7
use plunner\Employee;
8
use plunner\Http\Controllers\Controller;
9
use plunner\Http\Requests\Companies\EmployeeRequest;
10
11
12
class EmployeesController extends Controller
13
{
14
    /**
15
     * @var \plunner\Company
16
     */
17
    private $user;
0 ignored issues
show
Unused Code introduced by
The property $user is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
18
19
    /**
20
     * ExampleController constructor.
21
     */
22
    public function __construct()
23
    {
24
        config(['auth.model' => \plunner\Company::class]);
25
        config(['jwt.user' => \plunner\Company::class]);
26
        $this->middleware('jwt.authandrefresh:mode-cn');
27
    }
28
29
30
    /**
31
     * Display a listing of the resource.
32
     *
33
     * @param  int  $groupId
34
     * @return \Illuminate\Http\Response
35
     */
36
    public function index($groupId)
0 ignored issues
show
Unused Code introduced by
The parameter $groupId is not used and could be removed.

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

Loading history...
37
    {
38
        //
39
        //TODO remember to use authorize even here
40
    }
41
42
    /**
43
     * Store a newly created resource in storage.
44
     *
45
     * @param  \Illuminate\Http\Request  $request
46
     * @param  int  $groupId
47
     * @return \Illuminate\Http\Response
48
     */
49
    public function store(Request $request, $groupId)
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $groupId is not used and could be removed.

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

Loading history...
50
    {
51
        //
52
        //TODO remember to use authorize even here
53
    }
54
55
    /**
56
     * Display the specified resource.
57
     *
58
     * @param  int  $groupId
59
     * @param  int  $employeeId
60
     * @return \Illuminate\Http\Response
61
     */
62
    public function show($groupId, $employeeId)
0 ignored issues
show
Unused Code introduced by
The parameter $groupId is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $employeeId is not used and could be removed.

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

Loading history...
63
    {
64
        //
65
    }
66
67
    /**
68
     * Update the specified resource in storage.
69
     *
70
     * @param  \Illuminate\Http\Request  $request
71
     * @param  int  $groupId
72
     * @param  int  $employeeId
73
     * @return \Illuminate\Http\Response
74
     */
75
    public function update(Request $request, $groupId, $employeeId)
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $groupId is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $employeeId is not used and could be removed.

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

Loading history...
76
    {
77
        //
78
    }
79
80
    /**
81
     * Remove the specified resource from storage.
82
     *
83
     * @param  int  $groupId
84
     * @param  int  $employeeId
85
     * @return \Illuminate\Http\Response
86
     */
87
    public function destroy($groupId, $employeeId)
0 ignored issues
show
Unused Code introduced by
The parameter $groupId is not used and could be removed.

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

Loading history...
Unused Code introduced by
The parameter $employeeId is not used and could be removed.

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

Loading history...
88
    {
89
        //
90
    }
91
}
92