Code Duplication    Length = 74-78 lines in 2 locations

app/Http/Controllers/Companies/EmployeesController.php 1 location

@@ 12-89 (lines=78) @@
9
use Tymon\JWTAuth\Facades\JWTAuth;
10
use plunner\Company;
11
12
class EmployeesController extends Controller
13
{
14
    /**
15
     * @var \plunner\Company
16
     */
17
    private $user;
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
     * @return \Illuminate\Http\Response
34
     */
35
    public function index()
36
    {
37
        //
38
        /**
39
         * @var $company Company
40
         */
41
        $company = JWTAuth::getUserModel();
42
        return $company->employees;
43
    }
44
45
    /**
46
     * Store a newly created resource in storage.
47
     *
48
     * @param  \Illuminate\Http\Request  $request
49
     * @return \Illuminate\Http\Response
50
     */
51
    public function store(Request $request)
52
    {
53
        //
54
    }
55
56
    /**
57
     * Display the specified resource.
58
     *
59
     * @param  int  $id
60
     * @return \Illuminate\Http\Response
61
     */
62
    public function show($id)
63
    {
64
        //
65
    }
66
67
    /**
68
     * Update the specified resource in storage.
69
     *
70
     * @param  \Illuminate\Http\Request  $request
71
     * @param  int  $id
72
     * @return \Illuminate\Http\Response
73
     */
74
    public function update(Request $request, $id)
75
    {
76
        //
77
    }
78
79
    /**
80
     * Remove the specified resource from storage.
81
     *
82
     * @param  int  $id
83
     * @return \Illuminate\Http\Response
84
     */
85
    public function destroy($id)
86
    {
87
        //
88
    }
89
}
90

app/Http/Controllers/Companies/ExampleController.php 1 location

@@ 11-84 (lines=74) @@
8
use plunner\Http\Controllers\Controller;
9
use Tymon\JWTAuth\Facades\JWTAuth;
10
11
class ExampleController extends Controller
12
{
13
    /**
14
     * @var \plunner\Company
15
     */
16
    private $user;
17
18
    /**
19
     * ExampleController constructor.
20
     */
21
    public function __construct()
22
    {
23
        config(['auth.model' => \plunner\Company::class]);
24
        config(['jwt.user' => \plunner\Company::class]);
25
        $this->middleware('jwt.authandrefresh:mode-cn');
26
    }
27
28
29
    /**
30
     * Display a listing of the resource.
31
     *
32
     * @return \Illuminate\Http\Response
33
     */
34
    public function index()
35
    {
36
        //
37
        return JWTAuth::getUserModel();
38
    }
39
40
    /**
41
     * Store a newly created resource in storage.
42
     *
43
     * @param  \Illuminate\Http\Request  $request
44
     * @return \Illuminate\Http\Response
45
     */
46
    public function store(Request $request)
47
    {
48
        //
49
    }
50
51
    /**
52
     * Display the specified resource.
53
     *
54
     * @param  int  $id
55
     * @return \Illuminate\Http\Response
56
     */
57
    public function show($id)
58
    {
59
        //
60
    }
61
62
    /**
63
     * Update the specified resource in storage.
64
     *
65
     * @param  \Illuminate\Http\Request  $request
66
     * @param  int  $id
67
     * @return \Illuminate\Http\Response
68
     */
69
    public function update(Request $request, $id)
70
    {
71
        //
72
    }
73
74
    /**
75
     * Remove the specified resource from storage.
76
     *
77
     * @param  int  $id
78
     * @return \Illuminate\Http\Response
79
     */
80
    public function destroy($id)
81
    {
82
        //
83
    }
84
}
85