Code Duplication    Length = 15-16 lines in 2 locations

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

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