Conditions | 3 |
Paths | 3 |
Total Lines | 21 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | public function handle($match) |
||
35 | { |
||
36 | //for each player create an initial round |
||
37 | $input = array( |
||
38 | 'date' => $match['date'], |
||
39 | 'course_id' => $match['course'], |
||
40 | |||
41 | 'match_id' => $match['match_id'], |
||
42 | 'score' => 0, |
||
43 | 'esc' => 0 |
||
44 | ); |
||
45 | foreach($match['player'] as $player){ |
||
46 | $input['player_id'] = $player['player_id']; |
||
47 | //If team match then add team id to $input array |
||
48 | if(isset($player['team'])){ |
||
49 | $input['team_id'] = $player['team']; |
||
50 | } |
||
51 | $this->roundRepo->create($input); |
||
52 | } |
||
53 | |||
54 | } |
||
55 | |||
67 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.