Code Duplication    Length = 9-9 lines in 2 locations

src/TwitterAds.php 2 locations

@@ 699-707 (lines=9) @@
696
        $this->accountId = $accountId;
697
    }
698
699
    public function getRequestToken($oauth_callback)
700
    {
701
        $parameters = array();
702
        $parameters['oauth_callback'] = $oauth_callback;
703
        $request = $this->oAuthRequest($this->requestTokenURL(), 'GET', $parameters);
704
        $token = self::parse_parameters($request);
705
706
        return $token;
707
    }
708
709
    /**
710
     * Exchange request token and secret for an access token and
@@ 719-727 (lines=9) @@
716
     * "user_id" => "9436992",
717
     * "screen_name" => "abraham")
718
     */
719
    public function getAccessToken($oauth_verifier)
720
    {
721
        $parameters = array();
722
        $parameters['oauth_verifier'] = $oauth_verifier;
723
        $request = $this->oAuthRequest($this->accessTokenURL(), 'GET', $parameters);
724
        $token = self::parse_parameters($request);
725
726
        return $token;
727
    }
728
729
    // This function takes a input like a=b&a=c&d=e and returns the parsed
730
    // parameters like this