original_string: public function sendRequest($req)
      {
          $response = $this->send($req->getJSON());
  
          if ($response->id != $req->id) {
              throw new Clientside\Exception("Mismatched request id");
          }
  
          if(isset($response->error_code)) {
              throw new Clientside\Exception("{$response->error_code} {$response->error_message}", $response->error_code);
          }
  
          return $response->result;
      }
code: public function sendRequest($req)
      {
          $response = $this->send($req->getJSON());
  
          if ($response->id != $req->id) {
              throw new Clientside\Exception("Mismatched request id");
          }
  
          if(isset($response->error_code)) {
              throw new Clientside\Exception("{$response->error_code} {$response->error_message}", $response->error_code);
          }
  
          return $response->result;
      }
code_tokens: public function sendRequest ( $ req ) { $ response = $ this -> send ( $ req -> getJSON ( ) ) ; if ( $ response -> id != $ req -> id ) { throw new Clientside \ Exception ( "Mismatched request id" ) ; } if ( isset ( $ response -> error_code ) ) { throw new Clientside \ Exception ( "{$response->error_code} {$response->error_message}" , $ response -> error_code ) ; } return $ response -> result ; }
docstring: send a single request object
docstring_tokens: send a single request object