Code Duplication    Length = 8-9 lines in 2 locations

src/TreeGen/DirectEliminationTreeGen.php 1 location

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

src/TreeGen/PlayOffTreeGen.php 1 location

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