Code Duplication    Length = 8-8 lines in 2 locations

app/Repository/Project/Issue/Comment/UpdaterRepository.php 1 location

@@ 110-117 (lines=8) @@
107
    {
108
        $this->model->activity()->delete();
109
110
        foreach ($this->model->attachments as $attachment) {
111
            $path = config('filesystems.disks.local.root')
112
                . '/' . config('tinyissue.uploads_dir')
113
                . '/' . $this->model->project_id
114
                . '/' . $attachment->upload_token;
115
            $attachment->deleteFile($path, $attachment->filename);
116
            $attachment->delete();
117
        }
118
119
        // Add event on successful delete
120
        static::deleted(function (Issue\Comment $comment) {

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

@@ 109-116 (lines=8) @@
106
    {
107
        $this->activity()->delete();
108
109
        foreach ($this->attachments as $attachment) {
110
            $path = config('filesystems.disks.local.root')
111
                . '/' . config('tinyissue.uploads_dir')
112
                . '/' . $this->project_id
113
                . '/' . $attachment->upload_token;
114
            $attachment->deleteFile($path, $attachment->filename);
115
            $attachment->delete();
116
        }
117
118
        // Add event on successful delete
119
        static::deleted(function (Issue\Comment $comment) use ($user) {