Code Duplication    Length = 8-9 lines in 2 locations

src/TreeGen/PlayOffTreeGen.php 1 location

@@ 17-24 (lines=8) @@
14
     *
15
     * @return Collection
16
     */
17
    protected function getByeGroup($fighters)
18
    {
19
        $fighterCount = $fighters->count();
20
        $treeSize = $this->getTreeSize($fighterCount, 2);
21
        $byeCount = $treeSize - $fighterCount;
22
23
        return $this->createByeGroup($byeCount);
24
    }
25
26
    /**
27
     * Create empty groups for PlayOff Round.

src/TreeGen/DirectEliminationTreeGen.php 1 location

@@ 20-28 (lines=9) @@
17
     *
18
     * @return Collection
19
     */
20
    protected function getByeGroup($fighters)
21
    {
22
        $fighterCount = $fighters->count();
23
        $firstRoundGroupSize = $this->firstRoundGroupSize();
24
        $treeSize = $this->getTreeSize($fighterCount, $firstRoundGroupSize);
25
        $byeCount = $treeSize - $fighterCount;
26
        return $this->createByeGroup($byeCount);
27
    }
28
29
    /**
30
     * Save Groups with their parent info.
31
     *