@@ -29,7 +29,7 @@ |
||
| 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 | } |
@@ -55,17 +55,17 @@ |
||
| 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; |
@@ -29,7 +29,7 @@ |
||
| 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 | } |
@@ -55,7 +55,7 @@ |
||
| 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 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -22,7 +22,7 @@ discard block |
||
| 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 |
||
| 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, |
@@ -32,7 +32,7 @@ |
||
| 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(); |
@@ -12,13 +12,13 @@ |
||
| 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 { |
@@ -30,9 +30,9 @@ |
||
| 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 | } |