Code Duplication    Length = 18-18 lines in 2 locations

app/Repository/Project/Issue/Updater.php 1 location

@@ 186-203 (lines=18) @@
183
     *
184
     * @return $this
185
     */
186
    public function changeProject($projectId)
187
    {
188
        $this->model->project_id = $projectId;
189
        $this->save();
190
        $comments = $this->model->comments()->get();
191
        foreach ($comments as $comment) {
192
            $comment->project_id = $projectId;
193
            $comment->save();
194
        }
195
196
        $activities = $this->model->activities()->get();
197
        foreach ($activities as $activity) {
198
            $activity->parent_id = $projectId;
199
            $activity->save();
200
        }
201
202
        return $this;
203
    }
204
205
    /**
206
     * Delete an issue.

app/Repository/Traits/Project/Issue/CrudTrait.php 1 location

@@ 178-195 (lines=18) @@
175
     *
176
     * @return $this
177
     */
178
    public function changeProject($projectId)
179
    {
180
        $this->project_id = $projectId;
181
        $this->save();
182
        $comments = $this->comments()->get();
183
        foreach ($comments as $comment) {
184
            $comment->project_id = $projectId;
185
            $comment->save();
186
        }
187
188
        $activities = $this->activities()->get();
189
        foreach ($activities as $activity) {
190
            $activity->parent_id = $projectId;
191
            $activity->save();
192
        }
193
194
        return $this;
195
    }
196
197
    /**
198
     * Delete an issue.