Code Duplication    Length = 6-6 lines in 2 locations

src/models/Fight.php 2 locations

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