Completed
Push — master ( d565f6...12549b )
by Michael
02:45
created
app/controllers/ScoringAverageController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 	 */
30 30
 	public function show($id)
31 31
 	{
32
-		$results  = $this->leagueStatistics->topFiveScoringAverageByYear($id);
32
+		$results = $this->leagueStatistics->topFiveScoringAverageByYear($id);
33 33
 		$data['data'] = $results;
34 34
 		return $data;
35 35
 	}
Please login to merge, or discard this patch.
app/controllers/EnterScoresController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -55,17 +55,17 @@
 block discarded – undo
55 55
 			//echo $holescore->hole->number .  " score = " . $holescore->score ." " . $diff . "<br>";
56 56
 
57 57
 		}
58
-		echo "Number of holes played by all = " . $count . "<br>";
59
-		echo "Number of birdies =" . $birdies . "     " . round($birdies/$count,2) . "%<br>";
60
-		echo "Number of pars = " . $pars . "     " . round($pars/$count,2) . "%<br>";
61
-		echo "Number of bogeys =" . $bogeys . "     " . round($bogeys/$count,2) . "%<br>";
62
-		echo "Number of double bogeys = " . $doubleBogeys . "     " . round($doubleBogeys/$count,2) . "%<br>";
63
-		echo "Number of triples =" . $triples . "     " . round($triples/$count,2) . "%<br>";
64
-		echo "Number of others = " . $others . "     " . round($others/$count,2) . "%<br>";
58
+		echo "Number of holes played by all = ".$count."<br>";
59
+		echo "Number of birdies =".$birdies."     ".round($birdies / $count, 2)."%<br>";
60
+		echo "Number of pars = ".$pars."     ".round($pars / $count, 2)."%<br>";
61
+		echo "Number of bogeys =".$bogeys."     ".round($bogeys / $count, 2)."%<br>";
62
+		echo "Number of double bogeys = ".$doubleBogeys."     ".round($doubleBogeys / $count, 2)."%<br>";
63
+		echo "Number of triples =".$triples."     ".round($triples / $count, 2)."%<br>";
64
+		echo "Number of others = ".$others."     ".round($others / $count, 2)."%<br>";
65 65
 		exit();
66 66
 		$scores = Score::where('player_id', '=', 2)->orderBy('date', 'desc')->take(20)->get();
67 67
 
68
-		foreach( $scores->id as $scoreId) {
68
+		foreach ($scores->id as $scoreId) {
69 69
 			$holescores[$score_id] = Holescore::where('score_id', '=', $scoreId)->get();
70 70
 		}
71 71
 		return $scores;
Please login to merge, or discard this patch.
app/controllers/BogeyController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 	 */
30 30
 	public function show($id)
31 31
 	{
32
-        $results  = $this->leagueStatistics->totalBogeys($id);
32
+        $results = $this->leagueStatistics->totalBogeys($id);
33 33
 		$data['data'] = $results;
34 34
 		return $data;
35 35
 	}
Please login to merge, or discard this patch.
app/controllers/LiveLeaderboardController.php 1 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.
app/library/Handlers/HoleScoreHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public function __construct(RoundRepository $roundRepo, HoleScoreRepository $holescoreRepo)
25 25
     {
26
-        $this->roundRepo= $roundRepo;
26
+        $this->roundRepo = $roundRepo;
27 27
         $this->holescoreRepo = $holescoreRepo;
28 28
     } // End of __construct
29 29
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         // Update score and esc in round table
39 39
         $holescores = $this->holescoreRepo->getByRound($holescore->round_id);
40 40
         $escTotal = 0;
41
-        foreach($holescores as $hole) {
41
+        foreach ($holescores as $hole) {
42 42
             $esc = new EquitableStrokeControl($hole);
43 43
             $escTotal += $esc->calculate();
44 44
         }
Please login to merge, or discard this patch.
app/library/Handlers/RoundHandler.php 1 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.
app/library/Services/MoneyService.php 1 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.
app/library/Services/CarryOver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,13 +12,13 @@
 block discarded – undo
12 12
         $levels = Level::all();
13 13
         $matches = Match::all();
14 14
         $carryOverMoney = array();
15
-        foreach ($levels as $key => $level){
15
+        foreach ($levels as $key => $level) {
16 16
             $carryOverMoney[$level->id] = 0;
17
-            foreach($matches as $matchesKey => $match) {
17
+            foreach ($matches as $matchesKey => $match) {
18 18
                 //check skins table for level and match
19 19
                 $skins = Skin::where('match_id', '=', $match->id)->where('level_id', '=', $level->id)->get();
20
-                if($skins->count() === 0 ) {
21
-                    if ($level->id === 1){
20
+                if ($skins->count() === 0) {
21
+                    if ($level->id === 1) {
22 22
                         $carryOverMoney[$level->id] += $match->skinsamoney;
23 23
                     }
24 24
                     else {
Please login to merge, or discard this patch.
app/library/Services/CalendarService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@
 block discarded – undo
30 30
     public function formatEvents($events)
31 31
     {
32 32
         $events->toArray();
33
-        foreach($events as $event){
34
-            $event['title'] = 'Match ' . $event->course->name;
35
-            $event['url'] = 'matches/' . $event->id . '/edit?group=1';
33
+        foreach ($events as $event) {
34
+            $event['title'] = 'Match '.$event->course->name;
35
+            $event['url'] = 'matches/'.$event->id.'/edit?group=1';
36 36
         }
37 37
         return $events;
38 38
     }
Please login to merge, or discard this patch.