Code Duplication    Length = 9-11 lines in 6 locations

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

@@ 126-134 (lines=9) @@
123
     * @return \stdClass
124
     * @throws TwitchException
125
     */
126
    public function userFollowChannels($user, $limit = null, $offset = null)
127
    {
128
        $queryString = $this->helper->buildQueryString(array(
129
            'limit' => $limit,
130
            'offset' => $offset,
131
        ));
132
133
        return $this->request->request(sprintf(self::URI_USER_FOLLOWS_CHANNEL, $user) . $queryString);
134
    }
135
136
    /**
137
     * Get the status of a follow relationship
@@ 228-238 (lines=11) @@
225
     * @return \stdClass
226
     * @throws TwitchException
227
     */
228
    public function teamList($limit = null, $offset = null)
229
    {
230
        $queryString = $this->helper->buildQueryString(array(
231
            'limit' => $limit,
232
            'offset' => $offset,
233
        ));
234
235
        $team = new Methods\Team($this->request);
236
237
        return $team->getTeams($queryString);
238
    }
239
240
    /**
241
     * Get all team members
@@ 259-267 (lines=9) @@
256
     * @return \stdClass
257
     * @throws TwitchException
258
     */
259
    public function channelFollows($channel, $limit = null, $offset = null)
260
    {
261
        $queryString = $this->helper->buildQueryString(array(
262
            'limit' => $limit,
263
            'offset' => $offset,
264
        ));
265
266
        return $this->request->request(sprintf(self::URI_CHANNEL_FOLLOWS, $channel) . $queryString);
267
    }
268
269
    /**
270
     * Get the specified channel's stream
@@ 291-300 (lines=10) @@
288
     * @throws TwitchException
289
     * @deprecated will be replaced by getStreams() function
290
     */
291
    public function streamSearch($query, $limit = null, $offset = null)
292
    {
293
        $queryString = $this->helper->buildQueryString(array(
294
            'query' => $query,
295
            'limit' => $limit,
296
            'offset' => $offset,
297
        ));
298
299
        return $this->request->request(self::URI_STREAMS_SEARCH . $queryString);
300
    }
301
302
    /**
303
     * Summarize streams
@@ 440-449 (lines=10) @@
437
     * @return \stdClass
438
     * @throws TwitchException
439
     */
440
    public function chatEmoticonsImages($emoteset = null)
441
    {
442
        $queryString = $this->helper->buildQueryString(array(
443
            'emotesets' => $emoteset,
444
        ));
445
446
        $chat = new Methods\Chat($this->request);
447
448
        return $chat->getEmoticonImages($queryString);
449
    }
450
451
    /**
452
     * Returns a list of chat badges
@@ 471-479 (lines=9) @@
468
     * @return \stdClass
469
     * @throws TwitchException
470
     */
471
    public function gamesTop($limit = null, $offset = null)
472
    {
473
        $queryString = $this->helper->buildQueryString(array(
474
            'limit' => $limit,
475
            'offset' => $offset,
476
        ));
477
478
        return $this->request->request(self::URI_GAMES_TOP . $queryString);
479
    }
480
481
    /**
482
     * Get HTML code for stream embedding