Code Duplication    Length = 6-6 lines in 2 locations

src/models/Fight.php 2 locations

@@ 37-42 (lines=6) @@
34
    {
35
        if ($championship->category->isTeam) {
36
            $fighters = $group->teams;
37
            if (sizeof($fighters) == 0){
38
                $fighters->push(new Team());
39
                $fighters->push(new Team());
40
            } else if (count($fighters) % 2 != 0) {
41
                $fighters->push(new Team(['name' => 'BYE']));
42
            }
43
44
        } else {
45
            $fighters = $group->competitors;
@@ 46-51 (lines=6) @@
43
44
        } else {
45
            $fighters = $group->competitors;
46
            if (sizeof($fighters) == 0){ // If
47
                $fighters->push(new Competitor());
48
                $fighters->push(new Competitor());
49
            }else if (count($fighters) % 2 != 0) { // If fighter is not pair, add a BYE
50
                $fighters->push(new Competitor());
51
            }
52
53
54
        }