Passed
Push — master ( d46c59...5ccd99 )
by Martin
05:38
created

SeatMapController::update()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 0
c 0
b 0
f 0
nc 1
nop 2
dl 0
loc 2
rs 10
1
<?php
2
3
namespace App\Http\Controllers\Admin;
4
5
use App\Http\Controllers\Controller;
6
use App\Http\Requests\Admin\CreateUpdateSeatMap;
7
use App\Location;
8
use App\PriceCategory;
9
use App\PriceList;
10
use App\SeatMap;
11
use Illuminate\Support\Facades\Log;
12
13
class SeatMapController extends Controller
14
{
15
    public function index()
16
    {
17
        return view('admin.dependencies.index', [
18
            'seatmaps' => SeatMap::all(),
19
            'locations' => Location::all(),
20
            'pricecategories' => PriceCategory::all(),
21
            'pricelists' => PriceList::all()
22
        ]);
23
    }
24
25
    public function create(CreateUpdateSeatMap $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

25
    public function create(/** @scrutinizer ignore-unused */ CreateUpdateSeatMap $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...
26
    {
27
28
    }
29
30
    public function get(SeatMap $seatMap)
31
    {
32
        return view('admin.dependencies.manage-seatmap', ['seatmap' => $seatMap]);
33
    }
34
35
    public function update(SeatMap $seatMap, CreateUpdateSeatMap $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 update(SeatMap $seatMap, /** @scrutinizer ignore-unused */ CreateUpdateSeatMap $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...
Unused Code introduced by
The parameter $seatMap 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 update(/** @scrutinizer ignore-unused */ SeatMap $seatMap, CreateUpdateSeatMap $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
38
    }
39
40
    public function delete(SeatMap $seatMap)
41
    {
42
        Log::info('Deleting seatmap#' . $seatMap->id . ' (' . $seatMap->name . ')');
43
44
        $seatMap->delete();
45
46
        // On successfull deletion redirect the browser to the overview
47
        return redirect()
48
            ->route('admin.dependencies.dashboard')
49
            ->with('status', 'Deleted seatmap successfull!');
50
    }
51
}
52