averageScoreByPlayerAndYear()   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 3
1
<?php
2
3
use GolfLeague\Statistics\Course\CourseStatistics as CourseStatistics;
4
5
class CourseStatisticsController 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(CourseStatistics $courseStats)
8
	{
9
		$this->courseStats = $courseStats;
10
	}
11
12
	/**
13
	 * Display a listing of the resource.
14
	 *
15
	 * @return Response
16
	 */
17
	public function index()
18
	{
19
		return View::make('courseStatistics');
20
	}
21
22
23
	/**
24
	 * Show the form for creating a new resource.
25
	 *
26
	 * @return Response
27
	 */
28
	public function create()
29
	{
30
		//
31
	}
32
33
34
	/**
35
	 * Store a newly created resource in storage.
36
	 *
37
	 * @return Response
38
	 */
39
	public function store()
40
	{
41
		//
42
	}
43
44
45
	/**
46
	 * Display the specified resource.
47
	 *
48
	 * @param  int  $id
49
	 * @return Response
50
	 */
51
	public function show($id)
52
	{
53
		//
54
	}
55
56
57
	/**
58
	 * Show the form for editing the specified resource.
59
	 *
60
	 * @param  int  $id
61
	 * @return Response
62
	 */
63
	public function edit($id)
64
	{
65
		//
66
	}
67
68
69
	/**
70
	 * Update the specified resource in storage.
71
	 *
72
	 * @param  int  $id
73
	 * @return Response
74
	 */
75
	public function update($id)
76
	{
77
		//
78
	}
79
80
81
	/**
82
	 * Remove the specified resource from storage.
83
	 *
84
	 * @param  int  $id
85
	 * @return Response
86
	 */
87
	public function destroy($id)
88
	{
89
		//
90
	}
91
92
	public function averageScore($courseId)
93
	{
94
		return $this->courseStats->averageScore($courseId);
95
	}
96
97
	public function averageScoreByPlayer($courseId, $playerId)
98
	{
99
		return $this->courseStats->averageScoreByPlayer($courseId, $playerId);
100
	}
101
102
	public function averageScoreByYear($courseId, $year)
103
	{
104
		return $this->courseStats->averageScoreByYear($courseId, $year);
105
	}
106
107
	public function averageScoreByPlayerAndYear($courseId, $playerId, $year)
108
	{
109
		return $this->courseStats->averageScoreByPlayerAndYear($courseId, $playerId, $year);
110
	}
111
112
}
113