Code Duplication    Length = 8-8 lines in 2 locations

app/Http/Controllers/Project/IssueController.php 1 location

@@ 300-307 (lines=8) @@
297
     *
298
     * @return \Illuminate\Http\RedirectResponse
299
     */
300
    public function getDeleteAttachment(Project $project, Issue $issue, Attachment $attachment)
301
    {
302
        $issue->setRelation('project', $project);
303
        $attachment->setRelation('issue', $issue);
304
        $attachment->updater($this->getLoggedUser())->delete();
305
306
        return redirect($issue->to())->with('notice', trans('tinyissue.attachment_has_been_deleted'));
307
    }
308
309
    /**
310
     * Display an attachment file such as image.

app/Http/Controllers/ProjectController.php 1 location

@@ 293-300 (lines=8) @@
290
     *
291
     * @return \Illuminate\Http\RedirectResponse
292
     */
293
    public function postAddNote(Project $project, Note $note, FormRequest\Note $request)
294
    {
295
        $note->setRelation('project', $project);
296
        $note->setRelation('createdBy', $this->getLoggedUser());
297
        $note->updater($this->getLoggedUser())->create($request->all());
298
299
        return redirect($note->to())->with('notice', trans('tinyissue.your_note_added'));
300
    }
301
302
    /**
303
     * Ajax: To update project note.