Code Duplication    Length = 34-34 lines in 9 locations

app/controllers/BirdController.php 1 location

@@ 6-39 (lines=34) @@
3
use GolfLeague\Statistics\League\LeagueStatistics as LeagueStatistics;
4
5
6
class BirdController extends \BaseController {
7
8
	public function __construct(LeagueStatistics $leagueStatistics)
9
    {
10
		$this->leagueStatistics = $leagueStatistics;
11
    }
12
13
    /**
14
	 * Display a listing of the resource.
15
	 *
16
	 * @return Response
17
	 */
18
	public function index()
19
	{
20
		//may use for get all
21
	}
22
23
24
	/**
25
	 * Display the specified resource.
26
	 *
27
	 * @param  int  $id
28
	 * @return Response
29
	 */
30
	public function show($id)
31
	{
32
        $results  = $this->leagueStatistics->totalBirdies($id);
33
		$data['data'] = $results;
34
		return $data;
35
	}
36
37
38
39
}
40

app/controllers/BogeyController.php 1 location

@@ 6-39 (lines=34) @@
3
use GolfLeague\Statistics\League\LeagueStatistics as LeagueStatistics;
4
5
6
class BogeyController extends \BaseController {
7
8
	public function __construct(LeagueStatistics $leagueStatistics)
9
    {
10
		$this->leagueStatistics = $leagueStatistics;
11
    }
12
13
    /**
14
	 * Display a listing of the resource.
15
	 *
16
	 * @return Response
17
	 */
18
	public function index()
19
	{
20
		//may use for get all
21
	}
22
23
24
	/**
25
	 * Display the specified resource.
26
	 *
27
	 * @param  int  $id
28
	 * @return Response
29
	 */
30
	public function show($id)
31
	{
32
        $results  = $this->leagueStatistics->totalBogeys($id);
33
		$data['data'] = $results;
34
		return $data;
35
	}
36
37
38
39
}
40

app/controllers/DoubleController.php 1 location

@@ 6-39 (lines=34) @@
3
use GolfLeague\Statistics\League\LeagueStatistics as LeagueStatistics;
4
5
6
class DoubleController extends \BaseController {
7
8
	public function __construct(LeagueStatistics $leagueStatistics)
9
    {
10
		$this->leagueStatistics = $leagueStatistics;
11
    }
12
13
    /**
14
	 * Display a listing of the resource.
15
	 *
16
	 * @return Response
17
	 */
18
	public function index()
19
	{
20
		//may use for get all
21
	}
22
23
24
	/**
25
	 * Display the specified resource.
26
	 *
27
	 * @param  int  $id
28
	 * @return Response
29
	 */
30
	public function show($id)
31
	{
32
        $results  = $this->leagueStatistics->totalDoubles($id);
33
		$data['data'] = $results;
34
		return $data;
35
	}
36
37
38
39
}
40

app/controllers/GrossController.php 1 location

@@ 6-39 (lines=34) @@
3
use GolfLeague\Statistics\League\LeagueStatistics as LeagueStatistics;
4
5
6
class GrossController extends \BaseController {
7
8
	public function __construct(LeagueStatistics $leagueStatistics)
9
    {
10
		$this->leagueStatistics = $leagueStatistics;
11
    }
12
13
    /**
14
	 * Display a listing of the resource.
15
	 *
16
	 * @return Response
17
	 */
18
	public function index()
19
	{
20
		//may use for get all
21
	}
22
23
24
	/**
25
	 * Display the specified resource.
26
	 *
27
	 * @param  int  $id
28
	 * @return Response
29
	 */
30
	public function show($id)
31
	{
32
		$results  = $this->leagueStatistics->topFiveLowestScoresByYear($id);
33
		$data['data'] = $results;
34
		return $data;
35
	}
36
37
38
39
}
40

app/controllers/NetController.php 1 location

@@ 6-39 (lines=34) @@
3
use GolfLeague\Statistics\League\LeagueStatistics as LeagueStatistics;
4
5
6
class NetController extends \BaseController {
7
8
	public function __construct(LeagueStatistics $leagueStatistics)
9
    {
10
		$this->leagueStatistics = $leagueStatistics;
11
    }
12
13
    /**
14
	 * Display a listing of the resource.
15
	 *
16
	 * @return Response
17
	 */
18
	public function index()
19
	{
20
		//may use for get all
21
	}
22
23
24
	/**
25
	 * Display the specified resource.
26
	 *
27
	 * @param  int  $id
28
	 * @return Response
29
	 */
30
	public function show($id)
31
	{
32
        $results  = $this->leagueStatistics->topFiveNetScoresByYear($id);
33
		$data['data'] = $results;
34
		return $data;
35
	}
36
37
38
39
}
40

app/controllers/OtherController.php 1 location

@@ 6-39 (lines=34) @@
3
use GolfLeague\Statistics\League\LeagueStatistics as LeagueStatistics;
4
5
6
class OtherController extends \BaseController {
7
8
	public function __construct(LeagueStatistics $leagueStatistics)
9
    {
10
		$this->leagueStatistics = $leagueStatistics;
11
    }
12
13
    /**
14
	 * Display a listing of the resource.
15
	 *
16
	 * @return Response
17
	 */
18
	public function index()
19
	{
20
		//may use for get all
21
	}
22
23
24
	/**
25
	 * Display the specified resource.
26
	 *
27
	 * @param  int  $id
28
	 * @return Response
29
	 */
30
	public function show($id)
31
	{
32
        $results  = $this->leagueStatistics->totalOthers($id);
33
		$data['data'] = $results;
34
		return $data;
35
	}
36
37
38
39
}
40

app/controllers/ParController.php 1 location

@@ 6-39 (lines=34) @@
3
use GolfLeague\Statistics\League\LeagueStatistics as LeagueStatistics;
4
5
6
class ParController extends \BaseController {
7
8
	public function __construct(LeagueStatistics $leagueStatistics)
9
    {
10
		$this->leagueStatistics = $leagueStatistics;
11
    }
12
13
    /**
14
	 * Display a listing of the resource.
15
	 *
16
	 * @return Response
17
	 */
18
	public function index()
19
	{
20
		//may use for get all
21
	}
22
23
24
	/**
25
	 * Display the specified resource.
26
	 *
27
	 * @param  int  $id
28
	 * @return Response
29
	 */
30
	public function show($id)
31
	{
32
        $results  = $this->leagueStatistics->totalPars($id);
33
		$data['data'] = $results;
34
		return $data;
35
	}
36
37
38
39
}
40

app/controllers/ScoringAverageController.php 1 location

@@ 6-39 (lines=34) @@
3
use GolfLeague\Statistics\League\LeagueStatistics as LeagueStatistics;
4
5
6
class ScoringAverageController extends \BaseController {
7
8
	public function __construct(LeagueStatistics $leagueStatistics)
9
    {
10
		$this->leagueStatistics = $leagueStatistics;
11
    }
12
13
    /**
14
	 * Display a listing of the resource.
15
	 *
16
	 * @return Response
17
	 */
18
	public function index()
19
	{
20
		//may use for get all
21
	}
22
23
24
	/**
25
	 * Display the specified resource.
26
	 *
27
	 * @param  int  $id
28
	 * @return Response
29
	 */
30
	public function show($id)
31
	{
32
		$results  = $this->leagueStatistics->topFiveScoringAverageByYear($id);
33
		$data['data'] = $results;
34
		return $data;
35
	}
36
37
38
39
}
40

app/controllers/EagleController.php 1 location

@@ 6-39 (lines=34) @@
3
use GolfLeague\Statistics\League\LeagueStatistics as LeagueStatistics;
4
5
6
class EagleController extends \BaseController {
7
8
    public function __construct(LeagueStatistics $leagueStatistics)
9
    {
10
        $this->leagueStatistics = $leagueStatistics;
11
    }
12
13
    /**
14
     * Display a listing of the resource.
15
     *
16
     * @return Response
17
     */
18
    public function index()
19
    {
20
        //may use for get all
21
    }
22
23
24
    /**
25
     * Display the specified resource.
26
     *
27
     * @param  int  $id
28
     * @return Response
29
     */
30
    public function show($id)
31
    {
32
        $results  = $this->leagueStatistics->totalEagles($id);
33
        $data['data'] = $results;
34
        return $data;
35
    }
36
37
38
39
}
40