Completed
Push — master ( d565f6...12549b )
by Michael
02:45
created
app/library/Services/MoneyService.php 2 patches
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.
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.
app/models/Ctp.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -6,18 +6,18 @@
 block discarded – undo
6 6
 	protected $fillable = ['player_id', 'hole_id', 'match_id', 'money'];
7 7
 
8 8
 	public function match()
9
-    {
10
-        return $this->belongsTo('Match');
11
-    }
9
+	{
10
+		return $this->belongsTo('Match');
11
+	}
12 12
 
13
-    public function player()
14
-    {
15
-        return $this->belongsTo('Player');
16
-    }
13
+	public function player()
14
+	{
15
+		return $this->belongsTo('Player');
16
+	}
17 17
 
18
-    public function hole()
19
-    {
20
-        return $this->belongsTo('Hole');
21
-    }
18
+	public function hole()
19
+	{
20
+		return $this->belongsTo('Hole');
21
+	}
22 22
 
23 23
 }
24 24
\ No newline at end of file
Please login to merge, or discard this patch.
app/models/Holescore.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -2,16 +2,16 @@
 block discarded – undo
2 2
 
3 3
 class Holescore extends Eloquent {
4 4
 
5
-    protected $guarded = ['id'];
6
-    protected $fillable = ['score', 'hole_id', 'round_id'];
5
+	protected $guarded = ['id'];
6
+	protected $fillable = ['score', 'hole_id', 'round_id'];
7 7
 
8
-    public function round()
9
-    {
10
-        return $this->belongsTo('Round');
11
-    }
8
+	public function round()
9
+	{
10
+		return $this->belongsTo('Round');
11
+	}
12 12
 
13 13
 	public function hole()
14
-    {
15
-        return $this->belongsTo('Hole');
16
-    }
14
+	{
15
+		return $this->belongsTo('Hole');
16
+	}
17 17
 }
18 18
\ No newline at end of file
Please login to merge, or discard this patch.
app/models/Level.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 Level extends Eloquent {
4 4
 	
5 5
 	public function skins()
6
-    {
7
-        return $this->hasMany('Skin');
8
-    }
6
+	{
7
+		return $this->hasMany('Skin');
8
+	}
9 9
 }
10 10
\ No newline at end of file
Please login to merge, or discard this patch.
app/models/Skin.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -3,22 +3,22 @@
 block discarded – undo
3 3
 class Skin extends Eloquent {
4 4
 
5 5
 	public function player()
6
-    {
7
-        return $this->belongsTo('Player');
8
-    }
6
+	{
7
+		return $this->belongsTo('Player');
8
+	}
9 9
 
10 10
 	public function matches()
11
-    {
12
-        return $this->belongsTo('Match');
13
-    }
11
+	{
12
+		return $this->belongsTo('Match');
13
+	}
14 14
 
15 15
 	public function level()
16
-    {
17
-        return $this->belongsTo('Level');
18
-    }
16
+	{
17
+		return $this->belongsTo('Level');
18
+	}
19 19
 
20 20
 	public function hole()
21
-    {
22
-        return $this->belongsTo('Hole');
23
-    }
21
+	{
22
+		return $this->belongsTo('Hole');
23
+	}
24 24
 }
25 25
\ No newline at end of file
Please login to merge, or discard this patch.
app/models/Netwinner.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,13 +3,13 @@
 block discarded – undo
3 3
 class Netwinner extends Eloquent {
4 4
 
5 5
 	public function match()
6
-    {
7
-        return $this->belongsTo('Match');
8
-    }
9
-
10
-    public function player()
11
-    {
12
-        return $this->belongsTo('Player');
13
-    }
6
+	{
7
+		return $this->belongsTo('Match');
8
+	}
9
+
10
+	public function player()
11
+	{
12
+		return $this->belongsTo('Player');
13
+	}
14 14
 
15 15
 }
16 16
\ No newline at end of file
Please login to merge, or discard this patch.
app/models/Point.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -3,18 +3,18 @@
 block discarded – undo
3 3
 class Point extends Eloquent 
4 4
 {
5 5
 	public function player()
6
-    {
7
-        return $this->belongsTo('Player');
8
-    }
6
+	{
7
+		return $this->belongsTo('Player');
8
+	}
9 9
 	
10 10
 	public function match()
11
-    {
12
-        return $this->belongsTo('Match');
13
-    }
11
+	{
12
+		return $this->belongsTo('Match');
13
+	}
14 14
 	
15 15
 	public function season()
16
-    {
17
-        return $this->hasManyThrough('Season', 'Match');
18
-    }
16
+	{
17
+		return $this->hasManyThrough('Season', 'Match');
18
+	}
19 19
 	
20 20
 }
21 21
\ No newline at end of file
Please login to merge, or discard this patch.