Code Duplication    Length = 15-16 lines in 2 locations

src/jofner/SDK/TwitchTV/TwitchSDK.php 2 locations

@@ 642-656 (lines=15) @@
639
     * @return \stdClass
640
     * @throws TwitchException
641
     */
642
    public function authLoginURL($scope)
643
    {
644
        $this->checkConfig();
645
646
        $queryString = $this->helper->buildQueryString(array(
647
            'response_type' => 'code',
648
            'client_id' => $this->getConfigParam('client_id'),
649
            'redirect_uri' => $this->getConfigParam('redirect_uri'),
650
            'scope' => $scope,
651
        ));
652
653
        $auth = new Methods\Auth($this->request);
654
655
        return $auth->getLoginURL($queryString);
656
    }
657
658
    /**
659
     * Get authentication access token
@@ 664-679 (lines=16) @@
661
     * @return \stdClass
662
     * @throws TwitchException
663
     */
664
    public function authAccessTokenGet($code)
665
    {
666
        $this->checkConfig();
667
668
        $queryString = $this->helper->buildQueryString(array(
669
            'client_id' => $this->getConfigParam('client_id'),
670
            'client_secret' => $this->getConfigParam('client_secret'),
671
            'grant_type' => 'authorization_code',
672
            'redirect_uri' => $this->getConfigParam('redirect_uri'),
673
            'code' => $code,
674
        ));
675
676
        $auth = new Methods\Auth($this->request);
677
678
        return $auth->getAccessToken($queryString);
679
    }
680
681
    /**
682
     * Get the authenticated user