Test Setup Failed
Pull Request — master (#107)
by Tim
07:58
created

TaskController   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 90
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 4
Bugs 1 Features 3
Metric Value
wmc 8
c 4
b 1
f 3
lcom 0
cbo 4
dl 0
loc 90
rs 10

8 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A index() 0 4 1
A create() 0 4 1
A store() 0 4 1
A show() 0 4 1
A edit() 0 4 1
A update() 0 4 1
A destroy() 0 7 1
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use Illuminate\Http\Request;
6
7
use App\Tasks;
8
use App\Http\Requests;
9
use App\Http\Controllers\Controller;
10
11
class TaskController extends Controller
12
{
13
    /**
14
     * TaskController constructor.
15
     */ 
16
    public function __construct()
17
    {
18
        $this->middleware('auth');
19
        $this->middleware('lang');
20
    }
21
22
    /**
23
     * Display a listing of the resource.
24
     *
25
     * @return \Illuminate\Http\Response
26
     */
27
    public function index()
28
    {
29
        return view("tasks.manage_tasks");
30
    }
31
32
    /**
33
     * Show the form for creating a new resource.
34
     *
35
     * @return \Illuminate\Http\Response
36
     */
37
    public function create()
38
    {
39
        //
40
    }
41
42
    /**
43
     * Store a newly created resource in storage.
44
     *
45
     * @param Request $request
46
     * @return \Illuminate\Http\Response
47
     */
48
    public function store(Request $request)
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...
49
    {
50
       //
51
    }
52
53
    /**
54
     * Display the specified resource.
55
     *
56
     * @param  int  $id
57
     * @return \Illuminate\Http\Response
58
     */
59
    public function show($id)
0 ignored issues
show
Unused Code introduced by
The parameter $id 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...
60
    {
61
        //
62
    }
63
64
    /**
65
     * Show the form for editing the specified resource.
66
     *
67
     * @param  int $id The id off the task in the database.
68
     * @return \Illuminate\Http\Response
69
     */
70
    public function edit($id)
0 ignored issues
show
Unused Code introduced by
The parameter $id 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...
71
    {
72
        //
73
    }
74
75
    /**
76
     * Update the specified resource in storage.
77
     *
78
     * @param  \Illuminate\Http\Request  $request
79
     * @param  int  $id
80
     * @return \Illuminate\Http\Response
81
     */
82
    public function update(Request $request, $id)
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 $id 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...
83
    {
84
        //
85
    }
86
87
    /**
88
     * Remove the specified resource from storage.
89
     *
90
     * @param Request $request
91
     * @return \Illuminate\Http\Response
92
     */
93
    public function destroy(Request $request)
94
    {
95
        Tasks::destroy($request->get('integer'));
96
        session()->flash('message', trans('FlashSession.tasksDestroy'));
97
98
        return redirect()->back();
99
    }
100
}
101