original_string: public function find($id)
      {
          $response = $this->client->request('GET', sprintf('/%s/%s', $this->name, $id));
          $json = (string) $response->getBody();
  
          if (404 === $response->getStatusCode()) {
              throw new Exception('Document does not exist');
          }
  
          return JSONEncoder::decode($json);
      }
code: public function find($id)
      {
          $response = $this->client->request('GET', sprintf('/%s/%s', $this->name, $id));
          $json = (string) $response->getBody();
  
          if (404 === $response->getStatusCode()) {
              throw new Exception('Document does not exist');
          }
  
          return JSONEncoder::decode($json);
      }
code_tokens: public function find ( $ id ) { $ response = $ this -> client -> request ( 'GET' , sprintf ( '/%s/%s' , $ this -> name , $ id ) ) ; $ json = ( string ) $ response -> getBody ( ) ; if ( 404 === $ response -> getStatusCode ( ) ) { throw new Exception ( 'Document does not exist' ) ; } return JSONEncoder :: decode ( $ json ) ; }
docstring: Find a document by a id.
  
  @param string $id
  
  @throws Exception If the document doesn't exists.
  
  @return mixed
docstring_tokens: Find a document by a id .