Completed
Push — master ( d565f6...12549b )
by Michael
02:45
created
app/controllers/CoursesController.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,6 @@
 block discarded – undo
42 42
     /**
43 43
      * Show the form for editing the specified resource.
44 44
      *
45
-     * @param  int  $id
46 45
      * @return Response
47 46
      */
48 47
     public function edit()
Please login to merge, or discard this patch.
Indentation   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -2,96 +2,96 @@
 block discarded – undo
2 2
 
3 3
 class CoursesController extends \BaseController {
4 4
 
5
-    public function __construct(Course $course)
6
-    {
7
-        $this->course = $course;
8
-    }
5
+	public function __construct(Course $course)
6
+	{
7
+		$this->course = $course;
8
+	}
9 9
 
10
-    /**
11
-     * Show the form for creating a new resource.
12
-     *
13
-     * @return Response
14
-     */
15
-    public function index()
16
-    {
17
-        $data = $this->course->all();
18
-        return $data;
19
-    }
10
+	/**
11
+	 * Show the form for creating a new resource.
12
+	 *
13
+	 * @return Response
14
+	 */
15
+	public function index()
16
+	{
17
+		$data = $this->course->all();
18
+		return $data;
19
+	}
20 20
 
21
-    /**
22
-     * Store a newly created resource in storage.
23
-     *
24
-     * @return Response
25
-     */
26
-    public function store()
27
-    {
28
-        //
29
-    }
21
+	/**
22
+	 * Store a newly created resource in storage.
23
+	 *
24
+	 * @return Response
25
+	 */
26
+	public function store()
27
+	{
28
+		//
29
+	}
30 30
 
31
-    /**
32
-     * Display the specified resource.
33
-     *
34
-     * @param  int  $id
35
-     * @return Response
36
-     */
37
-    public function show($id)
38
-    {
39
-        return Course::find($id)->get();
40
-    }
31
+	/**
32
+	 * Display the specified resource.
33
+	 *
34
+	 * @param  int  $id
35
+	 * @return Response
36
+	 */
37
+	public function show($id)
38
+	{
39
+		return Course::find($id)->get();
40
+	}
41 41
 
42
-    /**
43
-     * Show the form for editing the specified resource.
44
-     *
45
-     * @param  int  $id
46
-     * @return Response
47
-     */
48
-    public function edit()
49
-    {
42
+	/**
43
+	 * Show the form for editing the specified resource.
44
+	 *
45
+	 * @param  int  $id
46
+	 * @return Response
47
+	 */
48
+	public function edit()
49
+	{
50 50
 		$operation = Input::get('oper');
51
-        switch ($operation) {
52
-        case "add":
53
-            $this->course->name = Input::get('name');
51
+		switch ($operation) {
52
+		case "add":
53
+			$this->course->name = Input::get('name');
54 54
 			$this->course->par = Input::get('par');
55 55
 			$this->course->rating = Input::get('rating');
56 56
 			$this->course->slope = Input::get('slope');
57
-            $this->course->save();
58
-            break;
59
-        case "edit":
60
-            $id = Input::get('id');
61
-            $this->course = $this->course->find($id);
62
-            $this->course->name = Input::get('name');
57
+			$this->course->save();
58
+			break;
59
+		case "edit":
60
+			$id = Input::get('id');
61
+			$this->course = $this->course->find($id);
62
+			$this->course->name = Input::get('name');
63 63
 			$this->course->par = Input::get('par');
64 64
 			$this->course->rating = Input::get('rating');
65 65
 			$this->course->slope = Input::get('slope');
66
-            $this->course->save();
67
-            break;
68
-        case "del":
69
-            $id = Input::get('id');
70
-            $this->course = $this->course->destroy($id);
71
-            break;
72
-        }
73
-    }
66
+			$this->course->save();
67
+			break;
68
+		case "del":
69
+			$id = Input::get('id');
70
+			$this->course = $this->course->destroy($id);
71
+			break;
72
+		}
73
+	}
74 74
 
75
-    /**
76
-     * Update the specified resource in storage.
77
-     *
78
-     * @param  int  $id
79
-     * @return Response
80
-     */
81
-    public function update($id)
82
-    {
83
-        //
84
-    }
75
+	/**
76
+	 * Update the specified resource in storage.
77
+	 *
78
+	 * @param  int  $id
79
+	 * @return Response
80
+	 */
81
+	public function update($id)
82
+	{
83
+		//
84
+	}
85 85
 
86
-    /**
87
-     * Remove the specified resource from storage.
88
-     *
89
-     * @param  int  $id
90
-     * @return Response
91
-     */
92
-    public function destroy($id)
93
-    {
94
-        //
95
-    }
86
+	/**
87
+	 * Remove the specified resource from storage.
88
+	 *
89
+	 * @param  int  $id
90
+	 * @return Response
91
+	 */
92
+	public function destroy($id)
93
+	{
94
+		//
95
+	}
96 96
 
97 97
 }
98 98
\ No newline at end of file
Please login to merge, or discard this patch.
app/controllers/HolesController.php 2 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.
app/controllers/LiveLeaderboardController.php 2 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.
app/library/Handlers/FinalizeHandler.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     /**
22 22
      * Create a new instance of the MatchHandler
23 23
      *
24
-     * @param  GolfLeague\Storage\Round\RoundRepository $roundRepo
24
+     * @param  RoundRepository $roundRepo
25 25
      * @return void
26 26
      */
27 27
     public function __construct(RoundRepository $roundRepo)
Please login to merge, or discard this patch.
Indentation   +114 added lines, -114 removed lines patch added patch discarded remove patch
@@ -18,130 +18,130 @@
 block discarded – undo
18 18
  */
19 19
 class FinalizeHandler
20 20
 {
21
-    /**
22
-     * Create a new instance of the MatchHandler
23
-     *
24
-     * @param  GolfLeague\Storage\Round\RoundRepository $roundRepo
25
-     * @return void
26
-     */
27
-    public function __construct(RoundRepository $roundRepo)
28
-    {
29
-        $this->roundRepo= $roundRepo;
30
-    } // End of __construct
21
+	/**
22
+	 * Create a new instance of the MatchHandler
23
+	 *
24
+	 * @param  GolfLeague\Storage\Round\RoundRepository $roundRepo
25
+	 * @return void
26
+	 */
27
+	public function __construct(RoundRepository $roundRepo)
28
+	{
29
+		$this->roundRepo= $roundRepo;
30
+	} // End of __construct
31 31
 
32
-    /**
33
-     * Create an initial round for each player after a new match is created
34
-     *
35
-     * @param  Match $match
36
-     * @return void
37
-     */
38
-    public function handle($match)
39
-    {
40
-        //for the match get ctps, netwinner, grosswinner, and skins
41
-        //calculate winnings
42
-        //store in the pivot table match_player for the given player
32
+	/**
33
+	 * Create an initial round for each player after a new match is created
34
+	 *
35
+	 * @param  Match $match
36
+	 * @return void
37
+	 */
38
+	public function handle($match)
39
+	{
40
+		//for the match get ctps, netwinner, grosswinner, and skins
41
+		//calculate winnings
42
+		//store in the pivot table match_player for the given player
43 43
 
44
-        $winningPlayers = array();
45
-        $i = 1;
44
+		$winningPlayers = array();
45
+		$i = 1;
46 46
 
47
-        $ctpWinners = Ctp::where('match_id', '=', $match->id)->get();
48
-        foreach($ctpWinners as $key => $ctpWinner){
49
-            $playerExists = $this->recursive_array_search($ctpWinner->player_id, $winningPlayers);
50
-            //if player is already there add money here to other money
51
-            if($playerExists){
52
-                $winningPlayers[$i]['player_id'] = $ctpWinner->player_id;
53
-                $winningPlayers[$i]['money'] = ($ctpWinner->money + $winningPlayers[$playerExists]['money']);
54
-                unset($winningPlayers[$playerExists]);
55
-            }
56
-            else {
57
-                $winningPlayers[$i]['player_id'] = $ctpWinner->player_id;
58
-                $winningPlayers[$i]['money'] = $ctpWinner->money;
59
-            }
60
-            $i++;
61
-        }
47
+		$ctpWinners = Ctp::where('match_id', '=', $match->id)->get();
48
+		foreach($ctpWinners as $key => $ctpWinner){
49
+			$playerExists = $this->recursive_array_search($ctpWinner->player_id, $winningPlayers);
50
+			//if player is already there add money here to other money
51
+			if($playerExists){
52
+				$winningPlayers[$i]['player_id'] = $ctpWinner->player_id;
53
+				$winningPlayers[$i]['money'] = ($ctpWinner->money + $winningPlayers[$playerExists]['money']);
54
+				unset($winningPlayers[$playerExists]);
55
+			}
56
+			else {
57
+				$winningPlayers[$i]['player_id'] = $ctpWinner->player_id;
58
+				$winningPlayers[$i]['money'] = $ctpWinner->money;
59
+			}
60
+			$i++;
61
+		}
62 62
 
63
-        $netWinners = Netwinner::where('match_id', '=', $match->id)->get();
64
-        foreach($netWinners as $key => $netWinner){
65
-            $playerExists = $this->recursive_array_search($netWinner->player_id, $winningPlayers);
66
-            //if player is already there add money here to other money
67
-            if($playerExists){
68
-                $winningPlayers[$i]['player_id'] = $netWinner->player_id;
69
-                $winningPlayers[$i]['money'] = ($netWinner->money + $winningPlayers[$playerExists]['money']);
70
-                unset($winningPlayers[$playerExists]);
71
-            }
72
-            else{
73
-                $winningPlayers[$i]['player_id'] = $netWinner->player_id;
74
-                $winningPlayers[$i]['money'] = $netWinner->money;
75
-            }
76
-            $i++;
77
-        }
63
+		$netWinners = Netwinner::where('match_id', '=', $match->id)->get();
64
+		foreach($netWinners as $key => $netWinner){
65
+			$playerExists = $this->recursive_array_search($netWinner->player_id, $winningPlayers);
66
+			//if player is already there add money here to other money
67
+			if($playerExists){
68
+				$winningPlayers[$i]['player_id'] = $netWinner->player_id;
69
+				$winningPlayers[$i]['money'] = ($netWinner->money + $winningPlayers[$playerExists]['money']);
70
+				unset($winningPlayers[$playerExists]);
71
+			}
72
+			else{
73
+				$winningPlayers[$i]['player_id'] = $netWinner->player_id;
74
+				$winningPlayers[$i]['money'] = $netWinner->money;
75
+			}
76
+			$i++;
77
+		}
78 78
 
79
-        $grossWinners = Grosswinner::where('match_id', '=', $match->id)->get();
80
-        foreach($grossWinners as $key => $grossWinner){
81
-            $playerExists = $this->recursive_array_search($grossWinner->player_id, $winningPlayers);
82
-            //if player is already there add money here to other money
83
-            if($playerExists){
84
-                $winningPlayers[$i]['player_id'] = $grossWinner->player_id;
85
-                $winningPlayers[$i]['money'] = ($grossWinner->money + $winningPlayers[$playerExists]['money']);
86
-                unset($winningPlayers[$playerExists]);
87
-            }
88
-            else{
89
-                $winningPlayers[$i]['player_id'] = $grossWinner->player_id;
90
-                $winningPlayers[$i]['money'] = $grossWinner->money;
91
-            }
92
-            $i++;
93
-        }
79
+		$grossWinners = Grosswinner::where('match_id', '=', $match->id)->get();
80
+		foreach($grossWinners as $key => $grossWinner){
81
+			$playerExists = $this->recursive_array_search($grossWinner->player_id, $winningPlayers);
82
+			//if player is already there add money here to other money
83
+			if($playerExists){
84
+				$winningPlayers[$i]['player_id'] = $grossWinner->player_id;
85
+				$winningPlayers[$i]['money'] = ($grossWinner->money + $winningPlayers[$playerExists]['money']);
86
+				unset($winningPlayers[$playerExists]);
87
+			}
88
+			else{
89
+				$winningPlayers[$i]['player_id'] = $grossWinner->player_id;
90
+				$winningPlayers[$i]['money'] = $grossWinner->money;
91
+			}
92
+			$i++;
93
+		}
94 94
 
95
-        $skinWinners = Skin::where('match_id', '=', $match->id)->get();
96
-        foreach($skinWinners as $key => $skinWinner){
97
-            $playerExists = $this->recursive_array_search($skinWinner->player_id, $winningPlayers);
98
-            //if player is already there add money here to other money
99
-            if($playerExists){
100
-                $winningPlayers[$i]['player_id'] = $skinWinner->player_id;
101
-                $winningPlayers[$i]['money'] = ($skinWinner->money + $winningPlayers[$playerExists]['money']);
102
-                unset($winningPlayers[$playerExists]);
103
-            }
104
-            else{
105
-                $winningPlayers[$i]['player_id'] = $skinWinner->player_id;
106
-                $winningPlayers[$i]['money'] = $skinWinner->money;
107
-            }
108
-            $i++;
109
-        }
95
+		$skinWinners = Skin::where('match_id', '=', $match->id)->get();
96
+		foreach($skinWinners as $key => $skinWinner){
97
+			$playerExists = $this->recursive_array_search($skinWinner->player_id, $winningPlayers);
98
+			//if player is already there add money here to other money
99
+			if($playerExists){
100
+				$winningPlayers[$i]['player_id'] = $skinWinner->player_id;
101
+				$winningPlayers[$i]['money'] = ($skinWinner->money + $winningPlayers[$playerExists]['money']);
102
+				unset($winningPlayers[$playerExists]);
103
+			}
104
+			else{
105
+				$winningPlayers[$i]['player_id'] = $skinWinner->player_id;
106
+				$winningPlayers[$i]['money'] = $skinWinner->money;
107
+			}
108
+			$i++;
109
+		}
110 110
 
111
-        //Consolidate any multiple instances of a player
112
-        foreach ($winningPlayers as $key => $winningPlayer){
113
-            array_search($winningPlayer['player_id'], $winningPlayers);
114
-        }
111
+		//Consolidate any multiple instances of a player
112
+		foreach ($winningPlayers as $key => $winningPlayer){
113
+			array_search($winningPlayer['player_id'], $winningPlayers);
114
+		}
115 115
 
116
-        foreach ($winningPlayers as $key => $player){
117
-            $currentPlayer = Player::find($player['player_id']);
118
-            $attributes = array(
119
-                "winnings" => $player['money']
120
-            );
121
-            $currentPlayer->matches()->updateExistingPivot($match->id, $attributes); //save match_player pivot data
122
-        }// End foreach
116
+		foreach ($winningPlayers as $key => $player){
117
+			$currentPlayer = Player::find($player['player_id']);
118
+			$attributes = array(
119
+				"winnings" => $player['money']
120
+			);
121
+			$currentPlayer->matches()->updateExistingPivot($match->id, $attributes); //save match_player pivot data
122
+		}// End foreach
123 123
 
124 124
 
125
-    }
125
+	}
126 126
 
127
-    /**
128
-     * Register the listeners for the subscriber.
129
-     *
130
-     * @param  Illuminate\Events\Dispatcher $events
131
-     * @return array
132
-     */
133
-    public function subscribe($events)
134
-    {
135
-        $events->listen('match.finalize', 'GolfLeague\Handlers\FinalizeHandler');
136
-    }
127
+	/**
128
+	 * Register the listeners for the subscriber.
129
+	 *
130
+	 * @param  Illuminate\Events\Dispatcher $events
131
+	 * @return array
132
+	 */
133
+	public function subscribe($events)
134
+	{
135
+		$events->listen('match.finalize', 'GolfLeague\Handlers\FinalizeHandler');
136
+	}
137 137
 
138
-    public function recursive_array_search($needle,$haystack) {
139
-        foreach($haystack as $key=>$value) {
140
-            $current_key=$key;
141
-            if($needle===$value || (is_array($value) && $this->recursive_array_search($needle,$value) !== false)) {
142
-                return $current_key;
143
-            }
144
-        }
145
-        return false;
146
-    }
138
+	public function recursive_array_search($needle,$haystack) {
139
+		foreach($haystack as $key=>$value) {
140
+			$current_key=$key;
141
+			if($needle===$value || (is_array($value) && $this->recursive_array_search($needle,$value) !== false)) {
142
+				return $current_key;
143
+			}
144
+		}
145
+		return false;
146
+	}
147 147
 }
Please login to merge, or discard this patch.
app/library/Handlers/RoundHandler.php 2 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.
app/library/Services/MatchRoundService.php 2 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.
app/library/Services/MoneyService.php 2 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.
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.
app/models/Single.php 1 patch
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.
app/models/Game.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 class Game extends Eloquent {
4 4
 	
5 5
 	public function winners()
6
-    {
7
-        return $this->hasMany('Winner');
8
-    }
6
+	{
7
+		return $this->hasMany('Winner');
8
+	}
9 9
 }
10 10
\ No newline at end of file
Please login to merge, or discard this patch.