@@ -9,13 +9,13 @@ |
||
| 9 | 9 | class TournamentService |
| 10 | 10 | { |
| 11 | 11 | |
| 12 | - public function create($input) |
|
| 13 | - { |
|
| 14 | - //return $input; |
|
| 15 | - $tournament = new Tournament($input); |
|
| 16 | - $tournament->save(); |
|
| 12 | + public function create($input) |
|
| 13 | + { |
|
| 14 | + //return $input; |
|
| 15 | + $tournament = new Tournament($input); |
|
| 16 | + $tournament->save(); |
|
| 17 | 17 | |
| 18 | - return $tournament; |
|
| 18 | + return $tournament; |
|
| 19 | 19 | |
| 20 | - } |
|
| 20 | + } |
|
| 21 | 21 | } |
| 22 | 22 | \ No newline at end of file |
@@ -6,8 +6,7 @@ |
||
| 6 | 6 | use \Tournament as Tournament; |
| 7 | 7 | use \Tournamentdate as Tournamentdate; |
| 8 | 8 | |
| 9 | -class TournamentService |
|
| 10 | -{ |
|
| 9 | +class TournamentService { |
|
| 11 | 10 | |
| 12 | 11 | public function create($input) |
| 13 | 12 | { |
@@ -8,9 +8,9 @@ discard block |
||
| 8 | 8 | class LeaderboardService |
| 9 | 9 | { |
| 10 | 10 | public function __construct(MatchRound $matchRoundRepo) |
| 11 | - { |
|
| 12 | - $this->matchround = $matchRoundRepo; |
|
| 13 | - } |
|
| 11 | + { |
|
| 12 | + $this->matchround = $matchRoundRepo; |
|
| 13 | + } |
|
| 14 | 14 | |
| 15 | 15 | public function calculate($matchId, $type) |
| 16 | 16 | { |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | $handicap = round($this->matchround->getMatchPlayerHandicap($matchId, $round->player->id),0); |
| 34 | 34 | //$handicap = round($round->player->handicap,0); |
| 35 | 35 | $par = $handicap + $par; |
| 36 | - } |
|
| 36 | + } |
|
| 37 | 37 | $playerScore = $filteredHolecores->sum('score'); |
| 38 | 38 | |
| 39 | 39 | $player = [ |
@@ -58,13 +58,13 @@ discard block |
||
| 58 | 58 | * @return int |
| 59 | 59 | */ |
| 60 | 60 | public function currentParTotal($courseId, $holesPlayed) |
| 61 | - { |
|
| 62 | - //find par total for course given number of holes played |
|
| 61 | + { |
|
| 62 | + //find par total for course given number of holes played |
|
| 63 | 63 | $holes = Course::find($courseId)->holes; |
| 64 | 64 | $filteredHoles =$holes->slice(0,$holesPlayed); |
| 65 | 65 | return $filteredHoles->sum('par'); // Par for given number of holes |
| 66 | 66 | |
| 67 | - } |
|
| 67 | + } |
|
| 68 | 68 | |
| 69 | 69 | |
| 70 | 70 | } |
| 71 | 71 | \ No newline at end of file |