Code Duplication    Length = 13-13 lines in 2 locations

src/models/Fight.php 1 location

@@ 148-160 (lines=13) @@
145
     * In the original fight ( child ) return the field that contains data to copy to parent
146
     * @return null|string
147
     */
148
    public function getValueToUpdate()
149
    {
150
        if ($this->c1 != null && $this->c2 != null) {
151
            return null;
152
        }
153
        if ($this->c1 != null) {
154
            return "c1";
155
        }
156
        if ($this->c2 != null) {
157
            return "c2";
158
        }
159
        return null;
160
    }
161
162
    /**
163
     * Check if we are able to fill the parent fight or not

src/TreeGen/DirectEliminationTreeGen.php 1 location

@@ 139-151 (lines=13) @@
136
     * In the original fight ( child ) return the field that contains data to copy to parent
137
     * @return null|string
138
     */
139
    public function getValueToUpdate()
140
    {
141
        if ($this->c1 != null && $this->c2 != null) {
142
            return null;
143
        }
144
        if ($this->c1 != null) {
145
            return "c1";
146
        }
147
        if ($this->c2 != null) {
148
            return "c2";
149
        }
150
        return null;
151
    }
152
153
    /**
154
     * Check if we are able to fill the parent fight or not