1 | <?php namespace GolfLeague\Storage\HoleScore; |
||
6 | class EloquentHoleScoreRepository implements HoleScoreRepository |
||
7 | { |
||
8 | /*Return Score collections that include: |
||
9 | * Player Name |
||
10 | * Date |
||
11 | * Total |
||
12 | * Course |
||
13 | * Multideminsional Array of Hole Numbers and scores |
||
14 | **/ |
||
15 | public function __construct(Holescore $holescore) |
||
19 | |||
20 | public function all() |
||
24 | |||
25 | |||
26 | public function find($id) |
||
30 | |||
31 | public function create($input) |
||
35 | |||
36 | public function update($id, $score) |
||
42 | |||
43 | public function getByRound($roundId) |
||
47 | } |
||
48 |
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: