original_string: private function setOAuthHeaders(RequestInterface $request): RequestInterface
      {
          $now = new \DateTime();
          if ($this->now instanceof \DateTime) {
              $now = clone $this->now;
          }
  
          //Generate HTTP headers
          $encodedKey = \rawurlencode($this->oauthConsumerSecret).'&'.\rawurlencode($this->oauthAccessTokenSecret);
          $oauthParams = [
              'oauth_consumer_key' => $this->oauthConsumerKey,
              'oauth_token' => $this->oauthAccessToken,
              'oauth_nonce' => \sha1(\microtime(true).\rand(10000, 99999)),
              'oauth_timestamp' => $now->getTimestamp(),
              'oauth_signature_method' => 'PLAINTEXT',
              'oauth_version' => '1.0',
              'oauth_signature' => $encodedKey,
          ];
  
          $request = $request->withHeader('Authorization', $this->encodeOAuthHeaders($oauthParams));
  
          return $request->withHeader('Expect', '');
      }
code: private function setOAuthHeaders(RequestInterface $request): RequestInterface
      {
          $now = new \DateTime();
          if ($this->now instanceof \DateTime) {
              $now = clone $this->now;
          }
  
          //Generate HTTP headers
          $encodedKey = \rawurlencode($this->oauthConsumerSecret).'&'.\rawurlencode($this->oauthAccessTokenSecret);
          $oauthParams = [
              'oauth_consumer_key' => $this->oauthConsumerKey,
              'oauth_token' => $this->oauthAccessToken,
              'oauth_nonce' => \sha1(\microtime(true).\rand(10000, 99999)),
              'oauth_timestamp' => $now->getTimestamp(),
              'oauth_signature_method' => 'PLAINTEXT',
              'oauth_version' => '1.0',
              'oauth_signature' => $encodedKey,
          ];
  
          $request = $request->withHeader('Authorization', $this->encodeOAuthHeaders($oauthParams));
  
          return $request->withHeader('Expect', '');
      }
code_tokens: private function setOAuthHeaders ( RequestInterface $ request ) : RequestInterface { $ now = new \ DateTime ( ) ; if ( $ this -> now instanceof \ DateTime ) { $ now = clone $ this -> now ; } //Generate HTTP headers $ encodedKey = \ rawurlencode ( $ this -> oauthConsumerSecret ) . '&' . \ rawurlencode ( $ this -> oauthAccessTokenSecret ) ; $ oauthParams = [ 'oauth_consumer_key' => $ this -> oauthConsumerKey , 'oauth_token' => $ this -> oauthAccessToken , 'oauth_nonce' => \ sha1 ( \ microtime ( true ) . \ rand ( 10000 , 99999 ) ) , 'oauth_timestamp' => $ now -> getTimestamp ( ) , 'oauth_signature_method' => 'PLAINTEXT' , 'oauth_version' => '1.0' , 'oauth_signature' => $ encodedKey , ] ; $ request = $ request -> withHeader ( 'Authorization' , $ this -> encodeOAuthHeaders ( $ oauthParams ) ) ; return $ request -> withHeader ( 'Expect' , '' ) ; }
docstring: Internal method to generate HTTP headers to use for the API authentication with OAuth protocol.
  
  @param RequestInterface $request
  
  @return RequestInterface
docstring_tokens: Internal method to generate HTTP headers to use for the API authentication with OAuth protocol .