Code Duplication    Length = 12-16 lines in 5 locations

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

@@ 121-133 (lines=13) @@
118
     * @return \stdClass
119
     * @throws TwitchException
120
     */
121
    public function userFollowChannels($user, $limit = null, $offset = null, $direction = null, $sortby = null)
122
    {
123
        $queryString = $this->helper->buildQueryString(array(
124
            'limit' => $limit,
125
            'offset' => $offset,
126
            'direction' => $direction,
127
            'sortby' => $sortby,
128
        ));
129
130
        $follow = new Methods\Follow($this->request);
131
132
        return $follow->userFollowChannels($user, $queryString);
133
    }
134
135
    /**
136
     * Get the status of a follow relationship
@@ 270-282 (lines=13) @@
267
     * @return \stdClass
268
     * @throws TwitchException
269
     */
270
    public function channelFollows($channelName, $limit = null, $offset = null, $cursor = null, $direction = null)
271
    {
272
        $queryString = $this->helper->buildQueryString(array(
273
            'limit' => $limit,
274
            'offset' => $offset,
275
            'cursor' => $cursor,
276
            'direction' => $direction,
277
        ));
278
279
        $follow = new Methods\Follow($this->request);
280
281
        return $follow->getChannelFollows($channelName, $queryString);
282
    }
283
284
    /**
285
     * Get the specified channel's stream
@@ 325-340 (lines=16) @@
322
     * @return \stdClass
323
     * @throws TwitchException
324
     */
325
    public function streamsSummarize($game = null, array $channels = null, $hls = null)
326
    {
327
        if (!empty($channels)) {
328
            $channels = implode(',', $channels);
329
        }
330
331
        $queryString = $this->helper->buildQueryString(array(
332
            'game' => $game,
333
            'channel' => $channels,
334
            'hls' => $hls,
335
        ));
336
337
        $stream = new Methods\Stream($this->request);
338
339
        return $stream->getSummary($queryString);
340
    }
341
342
    /**
343
     * Get featured streams
@@ 350-361 (lines=12) @@
347
     * @return \stdClass
348
     * @throws TwitchException
349
     */
350
    public function streamsFeatured($limit = null, $offset = null, $hls = null)
351
    {
352
        $queryString = $this->helper->buildQueryString(array(
353
            'limit' => $limit,
354
            'offset' => $offset,
355
            'hls' => $hls,
356
        ));
357
358
        $stream = new Methods\Stream($this->request);
359
360
        return $stream->getFeatured($queryString);
361
    }
362
363
    /**
364
     * Get streams by channel
@@ 441-453 (lines=13) @@
438
     * @return \stdClass
439
     * @throws TwitchException
440
     */
441
    public function videosByChannel($channel, $limit = null, $offset = null, $broadcasts = null, $hls = null)
442
    {
443
        $queryString = $this->helper->buildQueryString(array(
444
            'limit' => $limit,
445
            'offset' => $offset,
446
            'broadcasts' => $broadcasts,
447
            'hls' => $hls,
448
        ));
449
450
        $video = new Methods\Video($this->request);
451
452
        return $video->getChannelVideos($channel, $queryString);
453
    }
454
455
    /**
456
     * Returns a links object to all other chat endpoints