original_string: public function build($type, $data, $hypertextRoutes = [])
      {
          if (!isset($this->types[$type])) {
              throw new \Exception("Unknown response type.");
          }
          return new $this->types[$type]($data, $hypertextRoutes);
      }
code: public function build($type, $data, $hypertextRoutes = [])
      {
          if (!isset($this->types[$type])) {
              throw new \Exception("Unknown response type.");
          }
          return new $this->types[$type]($data, $hypertextRoutes);
      }
code_tokens: public function build ( $ type , $ data , $ hypertextRoutes = [ ] ) { if ( ! isset ( $ this -> types [ $ type ] ) ) { throw new \ Exception ( "Unknown response type." ) ; } return new $ this -> types [ $ type ] ( $ data , $ hypertextRoutes ) ; }
docstring: Builds the response object.
  
  @param string $type The type of response to build.
  @param mixed $data The response data.
  @param optional array $hypertextRoutes An array of hypertext routes.
  
  @throws Exception Throws an exception for unknown response types.
  
  @return \RestPHP\Response The created object.
docstring_tokens: Builds the response object .