Completed
Push — master ( 2ab3b9...3652cb )
by Michael
02:59
created
app/controllers/HolesController.php 3 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,6 @@
 block discarded – undo
41 41
 	/**
42 42
 	 * Display the specified resource.
43 43
 	 *
44
-	 * @param  int  $course_id
45 44
 	 * @return Response
46 45
 	 */
47 46
 	public function show()
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,10 +3,10 @@  discard block
 block discarded – undo
3 3
 class HolesController extends \BaseController {
4 4
 
5 5
 	public function __construct(Course $course, Hole $hole)
6
-    {
6
+	{
7 7
 		$this->course = $course;
8 8
 		$this->hole = $hole;
9
-    }
9
+	}
10 10
 	/**
11 11
 	 * Display a listing of the resource.
12 12
 	 *
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 	public function index()
16 16
 	{
17 17
 		$data = $this->hole->all();
18
-        return $data;
18
+		return $data;
19 19
 	}
20 20
 
21 21
 	/**
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 class LiveLeaderboardController extends \BaseController {
7 7
 
8 8
 	public function __construct(LeaderboardService $leaderboard)
9
-    {
9
+	{
10 10
         $this->leaderboard = $leaderboard;
11 11
     }
12 12
 
Please login to merge, or discard this patch.
app/controllers/LiveLeaderboardController.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
     /**
14 14
 	 * Display a listing of the resource.
15 15
 	 *
16
-	 * @return Response
16
+	 * @return string
17 17
 	 */
18 18
 	public function index()
19 19
 	{
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
 class LiveLeaderboardController extends \BaseController {
7 7
 
8 8
 	public function __construct(LeaderboardService $leaderboard)
9
-    {
10
-        $this->leaderboard = $leaderboard;
11
-    }
9
+	{
10
+		$this->leaderboard = $leaderboard;
11
+	}
12 12
 
13
-    /**
13
+	/**
14 14
 	 * Display a listing of the resource.
15 15
 	 *
16 16
 	 * @return Response
@@ -51,12 +51,12 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	public function show($id)
53 53
 	{
54
-        $match = Input::get('match');
55
-        $type = $id;
54
+		$match = Input::get('match');
55
+		$type = $id;
56 56
 
57
-        //return net or gross leaderboard for live scoring
57
+		//return net or gross leaderboard for live scoring
58 58
 		$data['data'] = $this->leaderboard->calculate($match,$type);
59
-        return $data;
59
+		return $data;
60 60
 
61 61
 	}
62 62
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
         $type = $id;
56 56
 
57 57
         //return net or gross leaderboard for live scoring
58
-		$data['data'] = $this->leaderboard->calculate($match,$type);
58
+		$data['data'] = $this->leaderboard->calculate($match, $type);
59 59
         return $data;
60 60
 
61 61
 	}
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 class LiveLeaderboardController extends \BaseController {
7 7
 
8 8
 	public function __construct(LeaderboardService $leaderboard)
9
-    {
9
+	{
10 10
         $this->leaderboard = $leaderboard;
11 11
     }
12 12
 
Please login to merge, or discard this patch.
app/controllers/PlayersController.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,6 @@
 block discarded – undo
43 43
     /**
44 44
      * Show the form for editing the specified resource.
45 45
      *
46
-     * @param  int  $id
47 46
      * @return Response
48 47
      */
49 48
     public function edit()
Please login to merge, or discard this patch.
Indentation   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@  discard block
 block discarded – undo
4 4
 
5 5
 class PlayersController extends \BaseController {
6 6
 
7
-    public function __construct(PlayerRepo $player)
8
-    {
9
-        $this->player = $player;
10
-    }
7
+	public function __construct(PlayerRepo $player)
8
+	{
9
+		$this->player = $player;
10
+	}
11 11
 
12 12
 	/**
13 13
 	 * Get Data for all players
@@ -19,58 +19,58 @@  discard block
 block discarded – undo
19 19
 		return $this->player->all();
20 20
 	}
21 21
 
22
-    /**
23
-     * Store a newly created resource in storage.
24
-     *
25
-     * @return Response
26
-     */
27
-    public function store()
28
-    {
22
+	/**
23
+	 * Store a newly created resource in storage.
24
+	 *
25
+	 * @return Response
26
+	 */
27
+	public function store()
28
+	{
29 29
 		$this->player->create(Input::get('name'), Input::get('handicap'));
30
-    }
30
+	}
31 31
 
32
-    /**
33
-     * Display the specified resource.
34
-     *
35
-     * @param  int  $id
36
-     * @return Response
37
-     */
38
-    public function show($id)
39
-    {
40
-        return $this->player->find($id);
41
-    }
32
+	/**
33
+	 * Display the specified resource.
34
+	 *
35
+	 * @param  int  $id
36
+	 * @return Response
37
+	 */
38
+	public function show($id)
39
+	{
40
+		return $this->player->find($id);
41
+	}
42 42
 
43
-    /**
44
-     * Show the form for editing the specified resource.
45
-     *
46
-     * @param  int  $id
47
-     * @return Response
48
-     */
49
-    public function edit()
50
-    {
43
+	/**
44
+	 * Show the form for editing the specified resource.
45
+	 *
46
+	 * @param  int  $id
47
+	 * @return Response
48
+	 */
49
+	public function edit()
50
+	{
51 51
 
52
-    }
52
+	}
53 53
 
54
-    /**
55
-     * Update the specified resource in storage.
56
-     *
57
-     * @param  int  $id
58
-     * @return Response
59
-     */
60
-    public function update($id)
61
-    {
62
-        //
63
-    }
54
+	/**
55
+	 * Update the specified resource in storage.
56
+	 *
57
+	 * @param  int  $id
58
+	 * @return Response
59
+	 */
60
+	public function update($id)
61
+	{
62
+		//
63
+	}
64 64
 
65
-    /**
66
-     * Remove the specified resource from storage.
67
-     *
68
-     * @param  int  $id
69
-     * @return Response
70
-     */
71
-    public function destroy($id)
72
-    {
73
-        //
74
-    }
65
+	/**
66
+	 * Remove the specified resource from storage.
67
+	 *
68
+	 * @param  int  $id
69
+	 * @return Response
70
+	 */
71
+	public function destroy($id)
72
+	{
73
+		//
74
+	}
75 75
 
76 76
 }
77 77
\ No newline at end of file
Please login to merge, or discard this patch.
app/library/Handlers/MatchHandler.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     /**
18 18
      * Create a new instance of the MatchHandler
19 19
      *
20
-     * @param  GolfLeague\Storage\Round\RoundRepository $roundRepo
20
+     * @param  RoundRepository $roundRepo
21 21
      * @return void
22 22
      */
23 23
     public function __construct(RoundRepository $roundRepo)
Please login to merge, or discard this patch.
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -14,51 +14,51 @@
 block discarded – undo
14 14
  */
15 15
 class MatchHandler
16 16
 {
17
-    /**
18
-     * Create a new instance of the MatchHandler
19
-     *
20
-     * @param  GolfLeague\Storage\Round\RoundRepository $roundRepo
21
-     * @return void
22
-     */
23
-    public function __construct(RoundRepository $roundRepo)
24
-    {
25
-        $this->roundRepo= $roundRepo;
26
-    } // End of __construct
17
+	/**
18
+	 * Create a new instance of the MatchHandler
19
+	 *
20
+	 * @param  GolfLeague\Storage\Round\RoundRepository $roundRepo
21
+	 * @return void
22
+	 */
23
+	public function __construct(RoundRepository $roundRepo)
24
+	{
25
+		$this->roundRepo= $roundRepo;
26
+	} // End of __construct
27 27
 
28
-    /**
29
-     * Create an initial round for each player after a new match is created
30
-     *
31
-     * @param  Match $match
32
-     * @return void
33
-     */
34
-    public function handle($match)
35
-    {
36
-        //for each player create an initial round
37
-        //var_dump($holescore);
38
-        $input = array(
39
-        'date' => $match['date'],
40
-        // use holescore->round_id to get all holescores for that round
41
-         'course_id' => $match['course'],
28
+	/**
29
+	 * Create an initial round for each player after a new match is created
30
+	 *
31
+	 * @param  Match $match
32
+	 * @return void
33
+	 */
34
+	public function handle($match)
35
+	{
36
+		//for each player create an initial round
37
+		//var_dump($holescore);
38
+		$input = array(
39
+		'date' => $match['date'],
40
+		// use holescore->round_id to get all holescores for that round
41
+		 'course_id' => $match['course'],
42 42
 
43
-         'match_id' => $match['match_id'],
44
-         'score' => 0,
45
-         'esc' =>0
46
-         );
47
-         foreach($match['player'] as $player){
48
-         $input['player_id'] = $player['player_id'];
49
-         $this->roundRepo->create($input);
43
+		 'match_id' => $match['match_id'],
44
+		 'score' => 0,
45
+		 'esc' =>0
46
+		 );
47
+		 foreach($match['player'] as $player){
48
+		 $input['player_id'] = $player['player_id'];
49
+		 $this->roundRepo->create($input);
50 50
  }
51 51
 
52
-    }
52
+	}
53 53
 
54
-    /**
55
-     * Register the listeners for the subscriber.
56
-     *
57
-     * @param  Illuminate\Events\Dispatcher $events
58
-     * @return array
59
-     */
60
-    public function subscribe($events)
61
-    {
62
-        $events->listen('match.create', 'GolfLeague\Handlers\MatchHandler');
63
-    }
54
+	/**
55
+	 * Register the listeners for the subscriber.
56
+	 *
57
+	 * @param  Illuminate\Events\Dispatcher $events
58
+	 * @return array
59
+	 */
60
+	public function subscribe($events)
61
+	{
62
+		$events->listen('match.create', 'GolfLeague\Handlers\MatchHandler');
63
+	}
64 64
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function __construct(RoundRepository $roundRepo)
24 24
     {
25
-        $this->roundRepo= $roundRepo;
25
+        $this->roundRepo = $roundRepo;
26 26
     } // End of __construct
27 27
 
28 28
     /**
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
          'score' => 0,
45 45
          'esc' =>0
46 46
          );
47
-         foreach($match['player'] as $player){
47
+         foreach ($match['player'] as $player) {
48 48
          $input['player_id'] = $player['player_id'];
49 49
          $this->roundRepo->create($input);
50 50
  }
Please login to merge, or discard this patch.
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@  discard block
 block discarded – undo
12 12
  *
13 13
  * @author          Michael Schmidt
14 14
  */
15
-class MatchHandler
16
-{
15
+class MatchHandler {
17 16
     /**
18 17
      * Create a new instance of the MatchHandler
19 18
      *
@@ -44,7 +43,7 @@  discard block
 block discarded – undo
44 43
          'score' => 0,
45 44
          'esc' =>0
46 45
          );
47
-         foreach($match['player'] as $player){
46
+         foreach($match['player'] as $player) {
48 47
          $input['player_id'] = $player['player_id'];
49 48
          $this->roundRepo->create($input);
50 49
  }
Please login to merge, or discard this patch.
app/library/Handlers/RoundHandler.php 4 patches
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,6 @@  discard block
 block discarded – undo
17 17
     /**
18 18
      * Create a new instance of the MatchHandler
19 19
      *
20
-     * @param  GolfLeague\Storage\Round\RoundRepository $roundRepo
21 20
      * @return void
22 21
      */
23 22
     public function __construct(HoleScoreRepository $holescoreRepo)
@@ -28,7 +27,6 @@  discard block
 block discarded – undo
28 27
     /**
29 28
      * Create an initial round for each player after a new match is created
30 29
      *
31
-     * @param  Match $match
32 30
      * @return void
33 31
      */
34 32
     public function handle($round)
Please login to merge, or discard this patch.
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -14,47 +14,47 @@
 block discarded – undo
14 14
  */
15 15
 class RoundHandler
16 16
 {
17
-    /**
18
-     * Create a new instance of the MatchHandler
19
-     *
20
-     * @param  GolfLeague\Storage\Round\RoundRepository $roundRepo
21
-     * @return void
22
-     */
23
-    public function __construct(HoleScoreRepository $holescoreRepo)
24
-    {
25
-        $this->holescoreRepo= $holescoreRepo;
26
-    } // End of __construct
27
-
28
-    /**
29
-     * Create an initial round for each player after a new match is created
30
-     *
31
-     * @param  Match $match
32
-     * @return void
33
-     */
34
-    public function handle($round)
35
-    {
36
-        $holes = Hole::where('course_id', '=', $round['course_id'])->get();
37
-        foreach($holes as $hole){
38
-            $input = array(
39
-                'score' => null,
40
-                'hole_id' => $hole->id,
41
-                'round_id' => $round['id']
42
-            );
43
-            $this->holescoreRepo->create($input);
44
-        }
45
-
46
-
47
-
48
-    }
49
-
50
-    /**
51
-     * Register the listeners for the subscriber.
52
-     *
53
-     * @param  Illuminate\Events\Dispatcher $events
54
-     * @return array
55
-     */
56
-    public function subscribe($events)
57
-    {
58
-        $events->listen('eloquent.created: Round', 'GolfLeague\Handlers\RoundHandler');
59
-    }
17
+	/**
18
+	 * Create a new instance of the MatchHandler
19
+	 *
20
+	 * @param  GolfLeague\Storage\Round\RoundRepository $roundRepo
21
+	 * @return void
22
+	 */
23
+	public function __construct(HoleScoreRepository $holescoreRepo)
24
+	{
25
+		$this->holescoreRepo= $holescoreRepo;
26
+	} // End of __construct
27
+
28
+	/**
29
+	 * Create an initial round for each player after a new match is created
30
+	 *
31
+	 * @param  Match $match
32
+	 * @return void
33
+	 */
34
+	public function handle($round)
35
+	{
36
+		$holes = Hole::where('course_id', '=', $round['course_id'])->get();
37
+		foreach($holes as $hole){
38
+			$input = array(
39
+				'score' => null,
40
+				'hole_id' => $hole->id,
41
+				'round_id' => $round['id']
42
+			);
43
+			$this->holescoreRepo->create($input);
44
+		}
45
+
46
+
47
+
48
+	}
49
+
50
+	/**
51
+	 * Register the listeners for the subscriber.
52
+	 *
53
+	 * @param  Illuminate\Events\Dispatcher $events
54
+	 * @return array
55
+	 */
56
+	public function subscribe($events)
57
+	{
58
+		$events->listen('eloquent.created: Round', 'GolfLeague\Handlers\RoundHandler');
59
+	}
60 60
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function __construct(HoleScoreRepository $holescoreRepo)
24 24
     {
25
-        $this->holescoreRepo= $holescoreRepo;
25
+        $this->holescoreRepo = $holescoreRepo;
26 26
     } // End of __construct
27 27
 
28 28
     /**
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     public function handle($round)
35 35
     {
36 36
         $holes = Hole::where('course_id', '=', $round['course_id'])->get();
37
-        foreach($holes as $hole){
37
+        foreach ($holes as $hole) {
38 38
             $input = array(
39 39
                 'score' => null,
40 40
                 'hole_id' => $hole->id,
Please login to merge, or discard this patch.
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@  discard block
 block discarded – undo
12 12
  *
13 13
  * @author          Michael Schmidt
14 14
  */
15
-class RoundHandler
16
-{
15
+class RoundHandler {
17 16
     /**
18 17
      * Create a new instance of the MatchHandler
19 18
      *
@@ -34,7 +33,7 @@  discard block
 block discarded – undo
34 33
     public function handle($round)
35 34
     {
36 35
         $holes = Hole::where('course_id', '=', $round['course_id'])->get();
37
-        foreach($holes as $hole){
36
+        foreach($holes as $hole) {
38 37
             $input = array(
39 38
                 'score' => null,
40 39
                 'hole_id' => $hole->id,
Please login to merge, or discard this patch.
app/library/Services/MatchRoundService.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     /**
16 16
     * Loads our $matchRepo
17 17
     *
18
-    * @param MatchRepository $matchRepo
18
+    * @param MatchRepository $matchRoundRepo
19 19
     * @return MatchService
20 20
     */
21 21
     public function __construct(MatchRoundRepository $matchRoundRepo, RoundRepository $roundRepo, MatchRepository $match)
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     /**
33 33
     * Method to get match data from input Match id
34 34
     *
35
-    * @param mixed $matchdata
35
+    * @param mixed $matchId
36 36
     * @return JSON object
37 37
     */
38 38
     public function getByMatch($matchId)
Please login to merge, or discard this patch.
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -9,41 +9,41 @@
 block discarded – undo
9 9
 */
10 10
 class MatchRoundService
11 11
 {
12
-    // Containing our pokemonRepository to make all our database calls to
13
-    protected $matchRepo;
12
+	// Containing our pokemonRepository to make all our database calls to
13
+	protected $matchRepo;
14 14
 
15
-    /**
16
-    * Loads our $matchRepo
17
-    *
18
-    * @param MatchRepository $matchRepo
19
-    * @return MatchService
20
-    */
21
-    public function __construct(MatchRoundRepository $matchRoundRepo, RoundRepository $roundRepo, MatchRepository $match)
22
-    {
23
-        $this->matchRoundRepo = $matchRoundRepo;
24
-        $this->roundRepo = $roundRepo;
25
-        $this->match = $match;
26
-    }
15
+	/**
16
+	 * Loads our $matchRepo
17
+	 *
18
+	 * @param MatchRepository $matchRepo
19
+	 * @return MatchService
20
+	 */
21
+	public function __construct(MatchRoundRepository $matchRoundRepo, RoundRepository $roundRepo, MatchRepository $match)
22
+	{
23
+		$this->matchRoundRepo = $matchRoundRepo;
24
+		$this->roundRepo = $roundRepo;
25
+		$this->match = $match;
26
+	}
27 27
 
28
-    public function all()
29
-    {
30
-        return $this->matchRoundRepo->all();
31
-    }
32
-    /**
33
-    * Method to get match data from input Match id
34
-    *
35
-    * @param mixed $matchdata
36
-    * @return JSON object
37
-    */
38
-    public function getByMatch($matchId)
39
-    {
40
-        return $this->matchRoundRepo->getByMatch($matchId);
41
-    }
28
+	public function all()
29
+	{
30
+		return $this->matchRoundRepo->all();
31
+	}
32
+	/**
33
+	 * Method to get match data from input Match id
34
+	 *
35
+	 * @param mixed $matchdata
36
+	 * @return JSON object
37
+	 */
38
+	public function getByMatch($matchId)
39
+	{
40
+		return $this->matchRoundRepo->getByMatch($matchId);
41
+	}
42 42
 
43
-    public function getByMatchAndGroup($matchdata)
44
-    {
45
-        //Retrieve players in group
46
-        $players = $this->matchRoundRepo->matchGroup($matchdata['match_id'], $matchdata['group']);
47
-        return $players;
48
-    }
43
+	public function getByMatchAndGroup($matchdata)
44
+	{
45
+		//Retrieve players in group
46
+		$players = $this->matchRoundRepo->matchGroup($matchdata['match_id'], $matchdata['group']);
47
+		return $players;
48
+	}
49 49
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,7 @@
 block discarded – undo
7 7
 /**
8 8
 * Our MatchService, containing all useful methods for business logic around Matches
9 9
 */
10
-class MatchRoundService
11
-{
10
+class MatchRoundService {
12 11
     // Containing our pokemonRepository to make all our database calls to
13 12
     protected $matchRepo;
14 13
 
Please login to merge, or discard this patch.
app/library/Services/MoneyService.php 5 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,6 @@
 block discarded – undo
21 21
     /**
22 22
     * Loads our $matchRepo
23 23
     *
24
-    * @param MatchRepository $matchRepo
25 24
     * @return MatchService
26 25
     */
27 26
     public function __construct()
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,6 @@
 block discarded – undo
7 7
 use \Netwinner;
8 8
 use \Skin;
9 9
 
10
-use Illuminate\Events\Dispatcher;
11
-
12 10
 /**
13 11
 * MoneyService, containing all useful methods for business logic for money relating to a match
14 12
 */
Please login to merge, or discard this patch.
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -15,28 +15,28 @@
 block discarded – undo
15 15
 class MoneyService
16 16
 {
17 17
 
18
-    // Containing our matchRepository to make all our database calls
19
-    protected $matchRepo;
18
+	// Containing our matchRepository to make all our database calls
19
+	protected $matchRepo;
20 20
 
21
-    /**
22
-    * Loads our $matchRepo
23
-    *
24
-    * @param MatchRepository $matchRepo
25
-    * @return MatchService
26
-    */
27
-    public function __construct()
28
-    {
21
+	/**
22
+	 * Loads our $matchRepo
23
+	 *
24
+	 * @param MatchRepository $matchRepo
25
+	 * @return MatchService
26
+	 */
27
+	public function __construct()
28
+	{
29 29
 
30
-    }
30
+	}
31 31
 
32
-    public function totalMatchMoney($matchId)
33
-    {
34
-        //get player id and money for ctp
35
-        $results['ctps'] =  Ctp::with('player')->where('match_id', '=', $matchId)->get();
36
-        $results['skins'] = Skin::with('player', 'hole')->where('match_id', '=', $matchId)->get();
37
-        $results['netwinner'] = Netwinner::with('player')->where('match_id', '=', $matchId)->get();
38
-        $results['grosswinner'] = Grosswinner::with('player')->where('match_id', '=', $matchId)->get();
39
-        $results['moneylist'] = Match::with('players')->where('id', '=', $matchId)->get();
32
+	public function totalMatchMoney($matchId)
33
+	{
34
+		//get player id and money for ctp
35
+		$results['ctps'] =  Ctp::with('player')->where('match_id', '=', $matchId)->get();
36
+		$results['skins'] = Skin::with('player', 'hole')->where('match_id', '=', $matchId)->get();
37
+		$results['netwinner'] = Netwinner::with('player')->where('match_id', '=', $matchId)->get();
38
+		$results['grosswinner'] = Grosswinner::with('player')->where('match_id', '=', $matchId)->get();
39
+		$results['moneylist'] = Match::with('players')->where('id', '=', $matchId)->get();
40 40
 		return $results;
41
-    }
41
+	}
42 42
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     public function totalMatchMoney($matchId)
33 33
     {
34 34
         //get player id and money for ctp
35
-        $results['ctps'] =  Ctp::with('player')->where('match_id', '=', $matchId)->get();
35
+        $results['ctps'] = Ctp::with('player')->where('match_id', '=', $matchId)->get();
36 36
         $results['skins'] = Skin::with('player', 'hole')->where('match_id', '=', $matchId)->get();
37 37
         $results['netwinner'] = Netwinner::with('player')->where('match_id', '=', $matchId)->get();
38 38
         $results['grosswinner'] = Grosswinner::with('player')->where('match_id', '=', $matchId)->get();
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@
 block discarded – undo
12 12
 /**
13 13
 * MoneyService, containing all useful methods for business logic for money relating to a match
14 14
 */
15
-class MoneyService
16
-{
15
+class MoneyService {
17 16
 
18 17
     // Containing our matchRepository to make all our database calls
19 18
     protected $matchRepo;
Please login to merge, or discard this patch.
app/models/Hole.php 3 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -3,17 +3,17 @@
 block discarded – undo
3 3
 class Hole extends Eloquent 
4 4
 {
5 5
 	public function course()
6
-    {
7
-        return $this->belongsTo('Course');
8
-    }
6
+	{
7
+		return $this->belongsTo('Course');
8
+	}
9 9
 	
10 10
 	public function holescores()
11
-    {
12
-        return $this->hasMany('Holescore');
13
-    }
11
+	{
12
+		return $this->hasMany('Holescore');
13
+	}
14 14
 	
15 15
 	public function courses()
16
-    {
17
-        return $this->hasManyThrough('Course','Holescore');
18
-    }
16
+	{
17
+		return $this->hasManyThrough('Course','Holescore');
18
+	}
19 19
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,6 +14,6 @@
 block discarded – undo
14 14
 	
15 15
 	public function courses()
16 16
     {
17
-        return $this->hasManyThrough('Course','Holescore');
17
+        return $this->hasManyThrough('Course', 'Holescore');
18 18
     }
19 19
 }
Please login to merge, or discard this patch.
Braces   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,19 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-class Hole extends Eloquent 
4
-{
3
+class Hole extends Eloquent {
5 4
 	public function course()
6
-    {
5
+	{
7 6
         return $this->belongsTo('Course');
8 7
     }
9 8
 	
10 9
 	public function holescores()
11
-    {
10
+	{
12 11
         return $this->hasMany('Holescore');
13 12
     }
14 13
 	
15 14
 	public function courses()
16
-    {
15
+	{
17 16
         return $this->hasManyThrough('Course','Holescore');
18 17
     }
19 18
 }
Please login to merge, or discard this patch.
app/models/Single.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -2,13 +2,13 @@
 block discarded – undo
2 2
 
3 3
 class Single extends Eloquent
4 4
 {
5
-    public function match()
6
-    {
7
-        return $this->belongsTo('Match');
8
-    }
5
+	public function match()
6
+	{
7
+		return $this->belongsTo('Match');
8
+	}
9 9
 
10 10
 	public function players()
11
-    {
12
-        return $this->hasMany('Player');
13
-    }
11
+	{
12
+		return $this->hasMany('Player');
13
+	}
14 14
 }
15 15
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,14 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-class Single extends Eloquent
4
-{
3
+class Single extends Eloquent {
5 4
     public function match()
6 5
     {
7 6
         return $this->belongsTo('Match');
8 7
     }
9 8
 
10 9
 	public function players()
11
-    {
10
+	{
12 11
         return $this->hasMany('Player');
13 12
     }
14 13
 }
15 14
\ No newline at end of file
Please login to merge, or discard this patch.