src/Twitter/Connections/UserConnection.php
protected function constructRequestOptions($params, $client = null)
    {
        //empty options array
        $options = array();

        //this is a User connection, use Oauth1 tokens.
        $oauth = new Oauth1(array(
            'consumer_key'    => $this->credentials->getConsumerKey(),
            'consumer_secret' => $this->credentials->getConsumerSecret(),
            'token'           => $this->credentials->getAccessToken(),
            'token_secret'    => $this->credentials->getAccessTokenSecret()
        ));

        //attach oauth to Guzzle client
        if(is_null($client))
        {
            //use the instance client
            $this->guzzleClient->getEmitter()->attach($oauth);
        }
        else
        {
            //to the parameter specified in the client
            $client->getEmitter()->attach($oauth);
        }

        //if query parameters not supplied, continue.
        if(!is_null($params))
        {
            //Add query parameters to options.
            $options['query'] = $params;
        }

        //Set the "auth" request option to "oauth" to sign using oauth.
        $options['auth'] = 'oauth';

        //return constructed options
        return $options;
    }
protected function constructRequestOptions($params, $client = null)
    {
        //empty options array
        $options = array();

        //this is a User connection, use Oauth1 tokens.
        $oauth = new Oauth1(array(
            'consumer_key'    => $this->credentials->getConsumerKey(),
            'consumer_secret' => $this->credentials->getConsumerSecret(),
            'token'           => $this->credentials->getAccessToken(),
            'token_secret'    => $this->credentials->getAccessTokenSecret()
        ));

        //attach oauth to Guzzle client
        if(is_null($client))
        {
            //use the instance client
            $this->guzzleClient->getEmitter()->attach($oauth);
        }
        else
        {
            //to the parameter specified in the client
            $client->getEmitter()->attach($oauth);
        }

        //if query parameters not supplied, continue.
        if(!is_null($params))
        {
            //Add query parameters to options.
            $options['query'] = $params;
        }

        //Set the "auth" request option to "oauth" to sign using oauth.
        $options['auth'] = 'oauth';

        //return constructed options
        return $options;
    }
Constructs an options array that is sent with the request.

Uses Oauth tokens since this is a UserConnection.

@param array $params URL query parameters
@param GuzzleHttp\Client $client a client to attach Oauth1 plugin to (can be null).

@return array options for the request