original_string: public function generateContentType($extension)
      {
          if (!in_array($extension, InvalidExtensionException::getValidExtensions())) {
              throw InvalidExtensionException::fromExtension($extension);
          }
  
          return sprintf('image/%s', $extension == self::DEFAULT_EXTENSION ? 'jpeg' : $extension);
      }
code: public function generateContentType($extension)
      {
          if (!in_array($extension, InvalidExtensionException::getValidExtensions())) {
              throw InvalidExtensionException::fromExtension($extension);
          }
  
          return sprintf('image/%s', $extension == self::DEFAULT_EXTENSION ? 'jpeg' : $extension);
      }
code_tokens: public function generateContentType ( $ extension ) { if ( ! in_array ( $ extension , InvalidExtensionException :: getValidExtensions ( ) ) ) { throw InvalidExtensionException :: fromExtension ( $ extension ) ; } return sprintf ( 'image/%s' , $ extension == self :: DEFAULT_EXTENSION ? 'jpeg' : $ extension ) ; }
docstring: Generates the content-type corresponding to the provided extension
  @param $extension
  @return string
  @throws InvalidExtensionException
docstring_tokens: Generates the content - type corresponding to the provided extension