Code Duplication    Length = 8-9 lines in 2 locations

src/TreeGen/DirectEliminationTreeGen.php 1 location

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

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.