Code Duplication    Length = 10-11 lines in 2 locations

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

@@ 56-65 (lines=10) @@
53
     *
54
     * @return bool
55
     */
56
    public function delete()
57
    {
58
        $this->update([
59
            'email'   => $this->email . '_deleted',
60
            'deleted' => User::DELETED_USERS,
61
        ]);
62
        Project\User::where('user_id', '=', $this->id)->delete();
63
64
        return true;
65
    }
66
67
    /**
68
     * Updates the users settings, validates the fields.

app/Repository/User/Updater.php 1 location

@@ 62-72 (lines=11) @@
59
     *
60
     * @return bool
61
     */
62
    public function delete()
63
    {
64
        $this->model->update([
65
            'email'   => $this->model->email . '_deleted',
66
            'deleted' => User::DELETED_USERS,
67
        ]);
68
69
        ProjectUser::where('user_id', '=', $this->model->id)->delete();
70
71
        return true;
72
    }
73
74
    /**
75
     * Updates the users settings, validates the fields.