This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
12
{
13
14
use hasCompetitorsTrait;
15
16
/**
17
* @param FightersGroup $group
18
* @param $fighters
19
*
20
* @return FightersGroup
21
*/
22
public function syncGroup(FightersGroup $group, $fighters)
23
{
24
// Add all competitors to Pivot Table
25
return $group->syncCompetitors($fighters);
26
}
27
28
29
/**
30
* @param FightersGroup $group
31
* @param $competitor
32
* @param $fighterToUpdate
33
* Common to All Playoff and singleElim
34
*/
35
protected function addFighterToGroup(FightersGroup $group, $competitor, $fighterToUpdate)
36
{
37
// fighterToUpdate is coming at format c1, c2, c3 etc.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.