TeamController::findByYear()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
use GolfLeague\Storage\Team\TeamRepository as TeamRepo;
4
5
class TeamController 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
    private $team;
8
9
    public function __construct(TeamRepo $team)
10
    {
11
        $this->team = $team;
12
    }
13
    /**
14
	 * Display a listing of the resource.
15
	 *
16
	 * @return Response
17
	 */
18
	public function index()
19
	{
20
		return $this->team->all();
21
	}
22
23
24
	/**
25
	 * Show the form for creating a new resource.
26
	 *
27
	 * @return Response
28
	 */
29
	public function create()
30
	{
31
		//
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
     * Display a listing of the teams by year .
47
     *
48
     * @return Response
49
     */
50
	public function findByYear($year)
51
    {
52
        return $this->team->findByYear($year);
53
    }
54
55
	/**
56
	 * Display the specified resource.
57
	 *
58
	 * @param  int  $id
59
	 * @return Response
60
	 */
61
	public function show($id)
62
	{
63
		//
64
	}
65
66
67
	/**
68
	 * Show the form for editing the specified resource.
69
	 *
70
	 * @param  int  $id
71
	 * @return Response
72
	 */
73
	public function edit($id)
74
	{
75
		//
76
	}
77
78
79
	/**
80
	 * Update the specified resource in storage.
81
	 *
82
	 * @param  int  $id
83
	 * @return Response
84
	 */
85
	public function update($id)
86
	{
87
		//
88
	}
89
90
91
	/**
92
	 * Remove the specified resource from storage.
93
	 *
94
	 * @param  int  $id
95
	 * @return Response
96
	 */
97
	public function destroy($id)
98
	{
99
		//
100
	}
101
102
103
}
104