original_string: public function withType($contentType)
      {
          $mappedType = $this->resolveType($contentType);
          $new = clone $this;
          $new->_contentType = $mappedType;
          $new->_setContentType();
  
          return $new;
      }
code: public function withType($contentType)
      {
          $mappedType = $this->resolveType($contentType);
          $new = clone $this;
          $new->_contentType = $mappedType;
          $new->_setContentType();
  
          return $new;
      }
code_tokens: public function withType ( $ contentType ) { $ mappedType = $ this -> resolveType ( $ contentType ) ; $ new = clone $ this ; $ new -> _contentType = $ mappedType ; $ new -> _setContentType ( ) ; return $ new ; }
docstring: Get an updated response with the content type set.
  
  If you attempt to set the type on a 304 or 204 status code response, the
  content type will not take effect as these status codes do not have content-types.
  
  @param string $contentType Either a file extension which will be mapped to a mime-type or a concrete mime-type.
  @return static
docstring_tokens: Get an updated response with the content type set .