Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
33 | protected function addFighterToGroup(FightersGroup $group, $team, $fighterToUpdate) |
||
34 | { |
||
35 | // fighterToUpdate is coming at format c1, c2, c3 etc. |
||
36 | $numFighterToUpdate = substr($fighterToUpdate, 1); |
||
37 | $competitorGroup = FighterGroupTeam::where('fighters_group_id', $group->id) |
||
38 | ->get() |
||
39 | ->get($numFighterToUpdate - 1); |
||
40 | |||
41 | // we must update the right result |
||
42 | $competitorGroup->team_id = $team->id; |
||
43 | $competitorGroup->save(); |
||
44 | } |
||
45 | } |
||
46 |