Code Duplication    Length = 10-10 lines in 2 locations

src/Models/DirectEliminationFight.php 1 location

@@ 10-19 (lines=10) @@
7
8
class DirectEliminationFight extends Fight
9
{
10
    public function __construct(Fight $fight = null)
11
    {
12
        if ($fight!=null){
13
            $this->id= $fight->id;
14
            $this->short_id= $fight->short_id;
15
            $this->fighters_group_id= $fight->fighters_group_id;
16
            $this->c1= $fight->c1;
17
            $this->c2= $fight->c2;
18
        }
19
    }
20
    /**
21
     * @param Championship $championship
22
     */

src/Models/PreliminaryFight.php 1 location

@@ 10-19 (lines=10) @@
7
class PreliminaryFight extends Fight
8
{
9
10
    public function __construct(Fight $fight = null)
11
    {
12
        if ($fight!=null){
13
            $this->id= $fight->id;
14
            $this->short_id= $fight->short_id;
15
            $this->fighters_group_id= $fight->fighters_group_id;
16
            $this->c1= $fight->c1;
17
            $this->c2= $fight->c2;
18
        }
19
    }
20
21
    /**
22
     * Save a Fight.