Code Duplication    Length = 11-11 lines in 2 locations

app/Repository/Project/Updater.php 1 location

@@ 47-57 (lines=11) @@
44
     *
45
     * @return Project\User
46
     */
47
    public function assignUser($userId, $roleId = 0)
48
    {
49
        if ($userId <= 0) {
50
            return false;
51
        }
52
53
        return $this->model->projectUsers()->save(new Project\User([
54
            'user_id' => $userId,
55
            'role_id' => $roleId,
56
        ]));
57
    }
58
59
    public function assignUsers(array $userIds)
60
    {

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

@@ 123-133 (lines=11) @@
120
     *
121
     * @return Project\User
122
     */
123
    public function assignUser($userId, $roleId = 0)
124
    {
125
        if ($userId <= 0) {
126
            return false;
127
        }
128
129
        return $this->projectUsers()->save(new Project\User([
130
            'user_id' => $userId,
131
            'role_id' => $roleId,
132
        ]));
133
    }
134
135
    /**
136
     *  Delete a project.