Code Duplication    Length = 13-13 lines in 2 locations

app/Services/Action/TaskAssignCurrentUser.php 1 location

@@ 72-84 (lines=13) @@
69
     *
70
     * @return bool True if the action was executed or false when not executed
71
     */
72
    public function doAction(array $data)
73
    {
74
        if (!$this->userSession->isLogged()) {
75
            return false;
76
        }
77
78
        $values = [
79
            'id'       => $data['task_id'],
80
            'owner_id' => $this->userSession->getId(),
81
        ];
82
83
        return $this->taskModel->update($values);
84
    }
85
86
    /**
87
     * Check if the event data meet the action condition.

app/Services/Action/TaskAssignCurrentUserColumn.php 1 location

@@ 78-90 (lines=13) @@
75
     *
76
     * @return bool True if the action was executed or false when not executed
77
     */
78
    public function doAction(array $data)
79
    {
80
        if (!$this->userSession->isLogged()) {
81
            return false;
82
        }
83
84
        $values = [
85
            'id'       => $data['task_id'],
86
            'owner_id' => $this->userSession->getId(),
87
        ];
88
89
        return $this->taskModel->update($values);
90
    }
91
92
    /**
93
     * Check if the event data meet the action condition.