Code Duplication    Length = 10-13 lines in 2 locations

app/Http/Controllers/Api/CommentController.php 1 location

@@ 86-98 (lines=13) @@
83
     *
84
     * @return \Illuminate\Http\JsonResponse
85
     */
86
    public function putComment(Request $request, Comment $comment)
87
    {
88
        try {
89
            $comment = $this->dispatch(new UpdateCommentCommand(
90
                $comment,
91
                $request->get('message')
92
            ));
93
        } catch (QueryException $e) {
94
            throw new BadRequestHttpException();
95
        }
96
97
        return $this->item($comment);
98
    }
99
100
    /**
101
     * Delete an existing comment.

app/Http/Controllers/Api/SubscriberController.php 1 location

@@ 45-54 (lines=10) @@
42
     *
43
     * @return \Illuminate\Http\JsonResponse
44
     */
45
    public function postSubscribers(Request $request)
46
    {
47
        try {
48
            $subscriber = $this->dispatch(new SubscribeSubscriberCommand($request->get('email'), $request->get('verify', false)));
49
        } catch (QueryException $e) {
50
            throw new BadRequestHttpException();
51
        }
52
53
        return $this->item($subscriber);
54
    }
55
56
    /**
57
     * Delete a subscriber.