Code Duplication    Length = 10-11 lines in 6 locations

src/ritero/SDK/TwitchTV/TwitchSDK.php 6 locations

@@ 170-180 (lines=11) @@
167
     * @return \stdClass
168
     * @throws TwitchException
169
     */
170
    public function userFollowChannel($user, $channel, $userToken, $notifications = false)
171
    {
172
        $queryString = $this->helper->buildQueryString(array(
173
            'oauth_token' => $userToken,
174
            'notifications' => $notifications,
175
        ));
176
177
        $follow = new Methods\Follow($this->request);
178
179
        return $follow->followChannel($user, $channel, $queryString);
180
    }
181
182
    /**
183
     * Set user to unfollow given channel
@@ 191-200 (lines=10) @@
188
     * @return \stdClass
189
     * @throws TwitchException
190
     */
191
    public function userUnfollowChannel($user, $channel, $userToken)
192
    {
193
        $queryString = $this->helper->buildQueryString(array(
194
            'oauth_token' => $userToken,
195
        ));
196
197
        $follow = new Methods\Follow($this->request);
198
199
        return $follow->unfollowChannel($user, $channel, $queryString);
200
    }
201
202
    /**
203
     * Get the specified channel
@@ 248-258 (lines=11) @@
245
     * @return \stdClass
246
     * @throws TwitchException
247
     */
248
    public function teamList($limit = null, $offset = null)
249
    {
250
        $queryString = $this->helper->buildQueryString(array(
251
            'limit' => $limit,
252
            'offset' => $offset,
253
        ));
254
255
        $team = new Methods\Team($this->request);
256
257
        return $team->getTeams($queryString);
258
    }
259
260
    /**
261
     * Get all team members
@@ 317-326 (lines=10) @@
314
     * @throws TwitchException
315
     * @deprecated will be replaced by getStreams() function
316
     */
317
    public function streamSearch($query, $limit = null, $offset = null)
318
    {
319
        $queryString = $this->helper->buildQueryString(array(
320
            'query' => $query,
321
            'limit' => $limit,
322
            'offset' => $offset,
323
        ));
324
325
        return $this->request->request(self::URI_STREAMS_SEARCH . $queryString);
326
    }
327
328
    /**
329
     * Summarize streams
@@ 497-506 (lines=10) @@
494
     * @return \stdClass
495
     * @throws TwitchException
496
     */
497
    public function chatEmoticonsImages($emoteset = null)
498
    {
499
        $queryString = $this->helper->buildQueryString(array(
500
            'emotesets' => $emoteset,
501
        ));
502
503
        $chat = new Methods\Chat($this->request);
504
505
        return $chat->getEmoticonImages($queryString);
506
    }
507
508
    /**
509
     * Returns a list of chat badges
@@ 528-538 (lines=11) @@
525
     * @return \stdClass
526
     * @throws TwitchException
527
     */
528
    public function gamesTop($limit = null, $offset = null)
529
    {
530
        $queryString = $this->helper->buildQueryString(array(
531
            'limit' => $limit,
532
            'offset' => $offset,
533
        ));
534
535
        $game = new Methods\Game($this->request);
536
537
        return $game->getTop($queryString);
538
    }
539
540
    /**
541
     * Get HTML code for stream embedding