Passed
Push — master ( c430e0...09e8fc )
by Davide
02:42 queued 11s
created

EventRepetitionController   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 88
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 88
rs 10
c 0
b 0
f 0
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A edit() 0 2 1
A show() 0 2 1
A index() 0 2 1
A update() 0 2 1
A create() 0 2 1
A store() 0 2 1
A destroy() 0 2 1
1
<?php
2
3
namespace DavideCasiraghi\LaravelEventsCalendar\Http\Controllers;
4
5
use App\EventRepetition;
0 ignored issues
show
Bug introduced by
The type App\EventRepetition was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Illuminate\Http\Request;
7
8
class EventRepetitionController extends Controller
9
{
10
    /**
11
     * Display a listing of the resource.
12
     *
13
     * @return \Illuminate\Http\Response
14
     */
15
    public function index()
16
    {
17
    }
18
19
    /**
20
     * Show the form for creating a new resource.
21
     *
22
     * @return \Illuminate\Http\Response
23
     */
24
    public function create()
25
    {
26
        //return view('eventCategories.create');
27
    }
28
29
    /**
30
     * Store a newly created resource in storage.
31
     *
32
     * @param  \Illuminate\Http\Request  $request
33
     * @return \Illuminate\Http\Response
34
     */
35
    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

35
    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...
36
    {
37
        /*request()->validate([
38
            'name' => 'required'
39
        ]);
40
41
        EventCategory::create($request->all());
42
43
        return redirect()->route('eventCategories.index')
44
                        ->with('success','Event category created successfully.');*/
45
    }
46
47
    /**
48
     * Display the specified resource.
49
     *
50
     * @param  \App\EventRepetition  $eventRepetition
51
     * @return \Illuminate\Http\Response
52
     */
53
    public function show(EventRepetition $eventRepetition)
0 ignored issues
show
Unused Code introduced by
The parameter $eventRepetition 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

53
    public function show(/** @scrutinizer ignore-unused */ EventRepetition $eventRepetition)

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...
54
    {
55
        //return view('eventCategories.show',compact('eventCategory'));
56
    }
57
58
    /**
59
     * Show the form for editing the specified resource.
60
     *
61
     * @param  \App\EventRepetition  $eventCategory
62
     * @return \Illuminate\Http\Response
63
     */
64
    public function edit(EventRepetition $eventRepetition)
0 ignored issues
show
Unused Code introduced by
The parameter $eventRepetition 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

64
    public function edit(/** @scrutinizer ignore-unused */ EventRepetition $eventRepetition)

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...
65
    {
66
        //return view('eventCategories.edit',compact('eventCategory'));
67
    }
68
69
    /**
70
     * Update the specified resource in storage.
71
     *
72
     * @param  \Illuminate\Http\Request  $request
73
     * @param  \App\EventRepetition  $eventRepetition
74
     * @return \Illuminate\Http\Response
75
     */
76
    public function update(Request $request, EventRepetition $eventRepetition)
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

76
    public function update(/** @scrutinizer ignore-unused */ Request $request, EventRepetition $eventRepetition)

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...
Unused Code introduced by
The parameter $eventRepetition 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

76
    public function update(Request $request, /** @scrutinizer ignore-unused */ EventRepetition $eventRepetition)

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...
77
    {
78
        /*request()->validate([
79
            'name' => 'required'
80
        ]);
81
82
        $eventCategory->update($request->all());
83
84
        return redirect()->route('eventCategories.index')
85
                        ->with('success','Event category updated successfully');*/
86
    }
87
88
    /**
89
     * Remove the specified resource from storage.
90
     *
91
     * @param  \App\EventCategory  $eventCategory
0 ignored issues
show
Bug introduced by
The type App\EventCategory was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
92
     * @return \Illuminate\Http\Response
93
     */
94
    public function destroy(EventCategory $eventRepetition)
0 ignored issues
show
Unused Code introduced by
The parameter $eventRepetition 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

94
    public function destroy(/** @scrutinizer ignore-unused */ EventCategory $eventRepetition)

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...
95
    {
96
        /*$eventCategory->delete();
97
        return redirect()->route('eventCategories.index')
98
                        ->with('success','Event category deleted successfully');*/
99
    }
100
101
    // **********************************************************************
102
}
103