Code Duplication    Length = 11-11 lines in 2 locations

app/Repository/Project/UpdaterRepository.php 1 location

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

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

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