original_string: public function request_token() {
          $this->sign_secret = $this->consumer_secret.'&';
  
          if (empty($this->oauth_callback)) {
              $params = [];
          } else {
              $params = ['oauth_callback' => $this->oauth_callback->out(false)];
          }
  
          $params = $this->prepare_oauth_parameters($this->request_token_api, $params, 'GET');
          $content = $this->http->get($this->request_token_api, $params, $this->http_options);
          // Including:
          //     oauth_token
          //     oauth_token_secret
          $result = $this->parse_result($content);
          if (empty($result['oauth_token'])) {
              throw new moodle_exception('oauth1requesttoken', 'core_error', '', null, $content);
          }
          // Build oauth authorize url.
          $result['authorize_url'] = $this->authorize_url . '?oauth_token='.$result['oauth_token'];
  
          return $result;
      }
code: public function request_token() {
          $this->sign_secret = $this->consumer_secret.'&';
  
          if (empty($this->oauth_callback)) {
              $params = [];
          } else {
              $params = ['oauth_callback' => $this->oauth_callback->out(false)];
          }
  
          $params = $this->prepare_oauth_parameters($this->request_token_api, $params, 'GET');
          $content = $this->http->get($this->request_token_api, $params, $this->http_options);
          // Including:
          //     oauth_token
          //     oauth_token_secret
          $result = $this->parse_result($content);
          if (empty($result['oauth_token'])) {
              throw new moodle_exception('oauth1requesttoken', 'core_error', '', null, $content);
          }
          // Build oauth authorize url.
          $result['authorize_url'] = $this->authorize_url . '?oauth_token='.$result['oauth_token'];
  
          return $result;
      }
code_tokens: public function request_token ( ) { $ this -> sign_secret = $ this -> consumer_secret . '&' ; if ( empty ( $ this -> oauth_callback ) ) { $ params = [ ] ; } else { $ params = [ 'oauth_callback' => $ this -> oauth_callback -> out ( false ) ] ; } $ params = $ this -> prepare_oauth_parameters ( $ this -> request_token_api , $ params , 'GET' ) ; $ content = $ this -> http -> get ( $ this -> request_token_api , $ params , $ this -> http_options ) ; // Including: //     oauth_token //     oauth_token_secret $ result = $ this -> parse_result ( $ content ) ; if ( empty ( $ result [ 'oauth_token' ] ) ) { throw new moodle_exception ( 'oauth1requesttoken' , 'core_error' , '' , null , $ content ) ; } // Build oauth authorize url. $ result [ 'authorize_url' ] = $ this -> authorize_url . '?oauth_token=' . $ result [ 'oauth_token' ] ; return $ result ; }
docstring: Request token for authentication
  This is the first step to use OAuth, it will return oauth_token and oauth_token_secret
  @return array
docstring_tokens: Request token for authentication This is the first step to use OAuth it will return oauth_token and oauth_token_secret