MatchEditController::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
use GolfLeague\Storage\Match\MatchRepository as MatchRepository;
4
5
class MatchEditController extends \BaseController {
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
6
7
    public function __construct(MatchRepository $matchRepository)
8
    {
9
        $this->matchRepo = $matchRepository;
10
    }
11
12
    /**
13
	 * Display a listing of the resource.
14
	 *
15
	 * @return Response
16
	 */
17
	public function index()
18
	{
19
		return $this->matchRepo->getEditableMatches();
20
	}
21
22
23
	/**
24
	 * Show the form for creating a new resource.
25
	 *
26
	 * @return Response
27
	 */
28
	public function create()
29
	{
30
		$view = View::make('editMatch');
31
		return $view;
32
	}
33
34
35
	/**
36
	 * Store a newly created resource in storage.
37
	 *
38
	 * @return Response
39
	 */
40
	public function store()
41
	{
42
		//
43
	}
44
45
46
	/**
47
	 * Display the specified resource.
48
	 *
49
	 * @param  int  $id
50
	 * @return Response
51
	 */
52
	public function show($id)
53
	{
54
		return $this->matchRepo->getEditable($id);
55
	}
56
57
58
	/**
59
	 * Show the form for editing the specified resource.
60
	 *
61
	 * @param  int  $id
62
	 * @return Response
63
	 */
64
	public function edit($id)
65
	{
66
		//
67
	}
68
69
70
	/**
71
	 * Update the specified resource in storage.
72
	 *
73
	 * @param  int  $id
74
	 * @return Response
75
	 */
76
	public function update($id)
77
	{
78
		// Update
79
80
		$matchdata = Input::all();
81
		return $this->matchRepo->update($matchdata);
82
	}
83
84
85
	/**
86
	 * Remove the specified resource from storage.
87
	 *
88
	 * @param  int  $id
89
	 * @return Response
90
	 */
91
	public function destroy($id)
92
	{
93
		//
94
	}
95
96
97
}
98