Code Duplication    Length = 10-10 lines in 2 locations

app/Http/ApiControllers/TopicsController.php 2 locations

@@ 78-87 (lines=10) @@
75
     *
76
     * @return \Dingo\Api\Http\Response
77
     */
78
    public function indexByUserFavorite($user_id)
79
    {
80
        $this->registerListApiIncludes();
81
82
        $data = $this->topics
83
            ->favoriteTopicsWithPaginator($user_id,
84
                ['id', 'title', 'is_excellent', 'reply_count', 'updated_at', 'created_at']);
85
86
        return $this->response()->paginator($data, new TopicTransformer());
87
    }
88
89
    /**
90
     * 用户关注的帖子列表.
@@ 96-105 (lines=10) @@
93
     *
94
     * @return \Dingo\Api\Http\Response
95
     */
96
    public function indexByUserAttention($user_id)
97
    {
98
        $this->registerListApiIncludes();
99
100
        $data = $this->topics
101
            ->attentionTopicsWithPaginator($user_id,
102
                ['id', 'title', 'is_excellent', 'reply_count', 'updated_at', 'created_at']);
103
104
        return $this->response()->paginator($data, new TopicTransformer());
105
    }
106
107
    /**
108
     * 发布新帖子.