Code Duplication    Length = 9-9 lines in 2 locations

src/models/Fight.php 1 location

@@ 168-176 (lines=9) @@
165
     *
166
     * @return bool
167
     */
168
    public function hasDeterminedParent()
169
    {
170
        if ($this->has2Fighters()) return true;
171
        foreach ($this->group->children as $child) {
172
            $fight = $child->fights->get(0);
173
            if ($fight->has2Fighters()) return false;
174
        }
175
        return true;
176
    }
177
178
    public function shouldBeInFightList()
179
    {

src/TreeGen/DirectEliminationTreeGen.php 1 location

@@ 159-167 (lines=9) @@
156
     *
157
     * @return bool
158
     */
159
    public function hasDeterminedParent()
160
    {
161
        if ($this->group->has2Fighters()) return true;
162
        foreach ($this->group->children as $child) {
163
            $fight = $child->fights->get(0);
164
            if ($fight->has2Fighters()) return false;
165
        }
166
        return true;
167
    }
168
169
    /**
170
     * Save Groups with their parent info