Code Duplication    Length = 6-6 lines in 2 locations

src/models/Fight.php 2 locations

@@ 46-51 (lines=6) @@
43
    {
44
        if ($championship->category->isTeam) {
45
            $fighters = $group->teams;
46
            if (sizeof($fighters) == 0) {
47
                $fighters->push(new Team());
48
                $fighters->push(new Team());
49
            } else if (count($fighters) % 2 != 0) {
50
                $fighters->push(new Team(['name' => 'BYE']));
51
            }
52
53
        } else {
54
            $fighters = $group->competitors;
@@ 55-60 (lines=6) @@
52
53
        } else {
54
            $fighters = $group->competitors;
55
            if (sizeof($fighters) == 0) { // If
56
                $fighters->push(new Competitor());
57
                $fighters->push(new Competitor());
58
            } else if (count($fighters) % 2 != 0) { // If fighter is not pair, add a BYE
59
                $fighters->push(new Competitor());
60
            }
61
62
63
        }