original_string: protected function resolveType($contentType)
      {
          $mapped = $this->getMimeType($contentType);
          if ($mapped) {
              return is_array($mapped) ? current($mapped) : $mapped;
          }
          if (strpos($contentType, '/') === false) {
              throw new InvalidArgumentException(sprintf('"%s" is an invalid content type.', $contentType));
          }
  
          return $contentType;
      }
code: protected function resolveType($contentType)
      {
          $mapped = $this->getMimeType($contentType);
          if ($mapped) {
              return is_array($mapped) ? current($mapped) : $mapped;
          }
          if (strpos($contentType, '/') === false) {
              throw new InvalidArgumentException(sprintf('"%s" is an invalid content type.', $contentType));
          }
  
          return $contentType;
      }
code_tokens: protected function resolveType ( $ contentType ) { $ mapped = $ this -> getMimeType ( $ contentType ) ; if ( $ mapped ) { return is_array ( $ mapped ) ? current ( $ mapped ) : $ mapped ; } if ( strpos ( $ contentType , '/' ) === false ) { throw new InvalidArgumentException ( sprintf ( '"%s" is an invalid content type.' , $ contentType ) ) ; } return $ contentType ; }
docstring: Translate and validate content-types.
  
  @param string $contentType The content-type or type alias.
  @return string The resolved content-type
  @throws \InvalidArgumentException When an invalid content-type or alias is used.
docstring_tokens: Translate and validate content - types .