code: public static function fromConsumerAndToken(
          Consumer $consumer,
          Token $token = null,
          $httpMethod,
          $httpUrl,
          array $parameters = [],
          $json = false
      ) {
          $defaults = [
              "oauth_version" => Request::$version,
              "oauth_nonce" => Request::generateNonce(),
              "oauth_timestamp" => time(),
              "oauth_consumer_key" => $consumer->key
          ];
          if (null !== $token) {
              $defaults['oauth_token'] = $token->key;
          }
  
          // The json payload is not included in the signature on json requests,
          // therefore it shouldn't be included in the parameters array.
          if ($json) {
              $parameters = $defaults;
          } else {
              $parameters = array_merge($defaults, $parameters);
          }
  
          return new Request($httpMethod, $httpUrl, $parameters);
      }
docs: pretty much a helper function to set up the request
  
  @param Consumer $consumer
  @param Token    $token
  @param string   $httpMethod
  @param string   $httpUrl
  @param array    $parameters
  
  @return Request