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/UpdaterRepository.php 1 location

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