Code Duplication    Length = 10-13 lines in 2 locations

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

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

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

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