Code Duplication    Length = 10-10 lines in 2 locations

app/Models/TaskPositionModel.php 2 locations

@@ 76-85 (lines=10) @@
73
     *
74
     * @return bool
75
     */
76
    private function saveSwimlaneChange($project_id, $task_id, $position, $original_column_id, $new_column_id, $original_swimlane_id, $new_swimlane_id)
77
    {
78
        $this->db->startTransaction();
79
        $r1 = $this->saveTaskPositions($project_id, $task_id, 0, $original_column_id, $original_swimlane_id);
80
        $r2 = $this->saveTaskPositions($project_id, $task_id, $position, $new_column_id, $new_swimlane_id);
81
        $r3 = $this->saveTaskTimestamps($task_id);
82
        $this->db->closeTransaction();
83
84
        return $r1 && $r2 && $r3;
85
    }
86
87
    /**
88
     * Move a task to another column.
@@ 99-108 (lines=10) @@
96
     *
97
     * @return bool
98
     */
99
    private function saveColumnChange($project_id, $task_id, $position, $swimlane_id, $original_column_id, $new_column_id)
100
    {
101
        $this->db->startTransaction();
102
        $r1 = $this->saveTaskPositions($project_id, $task_id, 0, $original_column_id, $swimlane_id);
103
        $r2 = $this->saveTaskPositions($project_id, $task_id, $position, $new_column_id, $swimlane_id);
104
        $r3 = $this->saveTaskTimestamps($task_id);
105
        $this->db->closeTransaction();
106
107
        return $r1 && $r2 && $r3;
108
    }
109
110
    /**
111
     * Move a task to another position in the same column.