Completed
Push — master ( d565f6...12549b )
by Michael
02:45
created
app/library/Classes/PrizeMoney.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
     public function setPurse($purse)
13 13
     {
14
-        $this->purse = $this->asMoney($purse - ($this->ctp  * 2));
14
+        $this->purse = $this->asMoney($purse - ($this->ctp * 2));
15 15
     }
16 16
 
17 17
     public function getlowScore()
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 	public function getSkinsPot($purse)
29 29
 	{
30
-		$this->skinsPot = $purse - (2*($this->ctp) + 2*($this->lowScore));
30
+		$this->skinsPot = $purse - (2 * ($this->ctp) + 2 * ($this->lowScore));
31 31
 		return $this->asMoney($this->skinsPot);
32 32
 	}
33 33
 
Please login to merge, or discard this patch.
app/library/Storage/EloquentRepositories/EloquentMatchRoundRepository.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
 
35 35
 	public function matchGroup($matchid, $group)
36 36
 	{
37
-        $players = Match::find($matchid)->players()->where('match_player.group','=',$group)->get();
38
-		foreach($players as $key => $player) {
37
+        $players = Match::find($matchid)->players()->where('match_player.group', '=', $group)->get();
38
+		foreach ($players as $key => $player) {
39 39
 			$rounds = Round::with('holescores', 'course.holes')->where('player_id', '=', $player->id)->where('match_id', '=', $matchid)->get();
40 40
             $players[$key]['round'] = $rounds;
41 41
 		}
@@ -44,14 +44,14 @@  discard block
 block discarded – undo
44 44
 
45 45
     public function getMatchData($matchid)
46 46
     {
47
-        $match = Match::find($matchid)->players()->where('match_player.match_id','=', $matchid)->get();
47
+        $match = Match::find($matchid)->players()->where('match_player.match_id', '=', $matchid)->get();
48 48
 		return $match;
49 49
     }
50 50
 
51 51
 	public function getMatchPlayerHandicap($matchid, $playerId)
52 52
 	{
53
-		$players = Player::find($playerId)->matches()->where('match_player.match_id','=', $matchid)->get();
54
-		foreach($players as $player){
53
+		$players = Player::find($playerId)->matches()->where('match_player.match_id', '=', $matchid)->get();
54
+		foreach ($players as $player) {
55 55
 			$handicap = $player['pivot']['handicap'];
56 56
 		}
57 57
 		return $handicap;
Please login to merge, or discard this patch.
app/library/Storage/EloquentRepositories/EloquentSkinRepository.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@
 block discarded – undo
4 4
 
5 5
 class EloquentHoleScoreRepository implements SkinRepository
6 6
 {
7
-        public function all(){}
8
-        public function find($id){}
9
-        public function findByPlayer($playerId){}
10
-        public function findByMatch($matchId){}
11
-        public function create($input){}
12
-        public function update($round){}
7
+        public function all() {}
8
+        public function find($id) {}
9
+        public function findByPlayer($playerId) {}
10
+        public function findByMatch($matchId) {}
11
+        public function create($input) {}
12
+        public function update($round) {}
13 13
 
14 14
 }
15 15
\ No newline at end of file
Please login to merge, or discard this patch.
app/library/Storage/EloquentRepositories/EloquentLeaderboardRepository.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,31 +15,31 @@
 block discarded – undo
15 15
         //Get all match ids for a given year
16 16
 		//get all player ids
17 17
 		//for each player id get total winnings from pivot where (player id and match id)
18
-		$year = $year . '-01-01';
18
+		$year = $year.'-01-01';
19 19
 		$matches = $this->match->with('players')->where('created_at', '>', $year)->get(); //get match eventually by year
20 20
 
21 21
 		//filter out players from match
22 22
 		$moneyList = array();
23 23
 		$players = array();
24
-		foreach($matches as $key => $item){
24
+		foreach ($matches as $key => $item) {
25 25
 			$players = $item->players;
26
-			foreach($players as $playersKey => $player){
26
+			foreach ($players as $playersKey => $player) {
27 27
 				if (array_key_exists($player->id, $moneyList)) {
28 28
 					//add previois to new
29 29
 					$moneyList[$player->id]['winnings'] = sprintf('%01.2f', ($moneyList[$player->id]['winnings'] + $player->pivot->winnings));
30 30
 					$moneyList[$player->id]['entryfees'] += 5;
31
-					$moneyList[$player->id]['entryfees'] = sprintf('%01.2f',$moneyList[$player->id]['entryfees']);
31
+					$moneyList[$player->id]['entryfees'] = sprintf('%01.2f', $moneyList[$player->id]['entryfees']);
32 32
 					$moneyList[$player->id]['net'] = $moneyList[$player->id]['winnings'] - $moneyList[$player->id]['entryfees'];
33
-					$moneyList[$player->id]['net'] = sprintf('%01.2f',$moneyList[$player->id]['net']);
33
+					$moneyList[$player->id]['net'] = sprintf('%01.2f', $moneyList[$player->id]['net']);
34 34
 				}
35 35
 				else {
36 36
 					$moneyList[$player->id]['id'] = $player->id;
37 37
 					$moneyList[$player->id]['name'] = $player->name;
38
-					$moneyList[$player->id]['winnings'] = sprintf('%01.2f',$player->pivot->winnings);
38
+					$moneyList[$player->id]['winnings'] = sprintf('%01.2f', $player->pivot->winnings);
39 39
 					$moneyList[$player->id]['entryfees'] = 5;
40
-					$moneyList[$player->id]['entryfees'] = sprintf('%01.2f',$moneyList[$player->id]['entryfees']);
40
+					$moneyList[$player->id]['entryfees'] = sprintf('%01.2f', $moneyList[$player->id]['entryfees']);
41 41
 					$moneyList[$player->id]['net'] = $moneyList[$player->id]['winnings'] - $moneyList[$player->id]['entryfees'];
42
-					$moneyList[$player->id]['net'] = sprintf('%01.2f',$moneyList[$player->id]['net']);
42
+					$moneyList[$player->id]['net'] = sprintf('%01.2f', $moneyList[$player->id]['net']);
43 43
 				}
44 44
 			}
45 45
 		}
Please login to merge, or discard this patch.
app/library/Storage/EloquentRepositories/EloquentPlayerRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
     public function all()
20 20
     {
21
-        return $this->player->orderBy('handicap','asc')->get();
21
+        return $this->player->orderBy('handicap', 'asc')->get();
22 22
     }
23 23
 
24 24
     //Find Player by Player Id
Please login to merge, or discard this patch.
app/library/Storage/EloquentRepositories/EloquentMatchRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
 
37 37
 	public function getYears()
38 38
 	{
39
-		$dates =  Match::orderBy('date', 'DESC')->get(['date']);
39
+		$dates = Match::orderBy('date', 'DESC')->get(['date']);
40 40
 		//return $dates;
41
-		$years = $dates->map(function($years){
41
+		$years = $dates->map(function($years) {
42 42
 			return substr($years->date, 0, 4);
43 43
 		})->toArray();
44 44
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
 		$this->match->save(); //save to match table
65 65
 
66
-		foreach ($matchdata['player'] as $key => $player){
66
+		foreach ($matchdata['player'] as $key => $player) {
67 67
 			$currentPlayer = $this->player->find($player['player_id']);
68 68
 			$attributes = array(
69 69
 				"level_id" => $player['level_id'],
Please login to merge, or discard this patch.
app/controllers/UsersController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
                     Config::get('confide::email_queue'),
37 37
                     Config::get('confide::email_account_confirmation'),
38 38
                     compact('user'),
39
-                    function ($message) use ($user) {
39
+                    function($message) use ($user) {
40 40
                         $message
41 41
                             ->to($user->email, $user->username)
42 42
                             ->subject(Lang::get('confide::confide.email.account_confirmation.subject'));
Please login to merge, or discard this patch.
app/filters.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 |
34 34
 */
35 35
 
36
-Route::filter('auth', function () {
36
+Route::filter('auth', function() {
37 37
 	// If the user is not logged in
38 38
 	if (Auth::guest()) {
39 39
 		return Redirect::guest('users/login');
Please login to merge, or discard this patch.
app/models/UserRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function login($input)
49 49
     {
50
-        if (! isset($input['password'])) {
50
+        if ( ! isset($input['password'])) {
51 51
             $input['password'] = null;
52 52
         }
53 53
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                 $user->password
86 86
             );
87 87
 
88
-            return (! $user->confirmed && $correctPassword);
88
+            return ( ! $user->confirmed && $correctPassword);
89 89
         }
90 90
     }
91 91
 
Please login to merge, or discard this patch.