@@ -3,8 +3,7 @@ discard block |
||
| 3 | 3 | use \Match as Match; |
| 4 | 4 | use \Player as Player; |
| 5 | 5 | |
| 6 | -class EloquentMatchRepository implements MatchRepository |
|
| 7 | -{ |
|
| 6 | +class EloquentMatchRepository implements MatchRepository { |
|
| 8 | 7 | /*Return Score collections that include: |
| 9 | 8 | * Player Name |
| 10 | 9 | * Date |
@@ -13,7 +12,7 @@ discard block |
||
| 13 | 12 | * Multideminsional Array of Hole Numbers and scores * |
| 14 | 13 | **/ |
| 15 | 14 | public function __construct(Match $match, Player $player) |
| 16 | - { |
|
| 15 | + { |
|
| 17 | 16 | $this->match = $match; |
| 18 | 17 | $this->player = $player; |
| 19 | 18 | } |
@@ -38,7 +37,8 @@ discard block |
||
| 38 | 37 | { |
| 39 | 38 | $dates = Match::orderBy('date', 'DESC')->get(['date']); |
| 40 | 39 | //return $dates; |
| 41 | - $years = $dates->map(function($years){ |
|
| 40 | + $years = $dates->map(function($years) |
|
| 41 | + { |
|
| 42 | 42 | return substr($years->date, 0, 4); |
| 43 | 43 | })->toArray(); |
| 44 | 44 | |
@@ -63,7 +63,7 @@ discard block |
||
| 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'], |