1 | <?php namespace GolfLeague\Storage\Player; |
||
5 | class EloquentPlayerRepository implements PlayerRepository |
||
6 | { |
||
7 | /*Return Score collections that include: |
||
8 | * Player Name |
||
9 | * Date |
||
10 | * Total |
||
11 | * Course |
||
12 | * Multideminsional Array of Hole Numbers and scores * |
||
13 | **/ |
||
14 | public function __construct(Player $player) |
||
18 | |||
19 | public function all() |
||
23 | |||
24 | //Find Player by Player Id |
||
25 | public function find($playerId) |
||
29 | |||
30 | public function create($name, $handicap) |
||
36 | |||
37 | } |
||
38 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: