1 | <?php namespace GolfLeague\Storage\Ctp; |
||
5 | class EloquentCtpRepository implements CtpRepository |
||
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 | |||
15 | public function all() |
||
19 | |||
20 | public function find($id) |
||
24 | |||
25 | //Find Ctps by Player Id |
||
26 | public function findByPlayer($playerId) |
||
30 | |||
31 | public function findByHole($holeId) |
||
35 | |||
36 | public function findByMatch($matchId) |
||
40 | |||
41 | public function create($input) |
||
45 | |||
46 | //pass this a Ctp Eloquent object and replace it in database |
||
47 | public function update($ctp) |
||
53 | } |
||
54 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.