original_string: protected function getImageInstance()
      {
          //Tries to create the image instance
          try {
              $imageInstance = $this->ImageManager->make($this->path);
          } catch (NotReadableException $e) {
              $message = __d('thumber', 'Unable to read image from file `{0}`', rtr($this->path));
  
              if ($e->getMessage() == 'Unsupported image type. GD driver is only able to decode JPG, PNG, GIF or WebP files.') {
                  $message = __d('thumber', 'Image type `{0}` is not supported by this driver', mime_content_type($this->path));
              }
  
              throw new RuntimeException($message);
          }
  
          return $imageInstance;
      }
code: protected function getImageInstance()
      {
          //Tries to create the image instance
          try {
              $imageInstance = $this->ImageManager->make($this->path);
          } catch (NotReadableException $e) {
              $message = __d('thumber', 'Unable to read image from file `{0}`', rtr($this->path));
  
              if ($e->getMessage() == 'Unsupported image type. GD driver is only able to decode JPG, PNG, GIF or WebP files.') {
                  $message = __d('thumber', 'Image type `{0}` is not supported by this driver', mime_content_type($this->path));
              }
  
              throw new RuntimeException($message);
          }
  
          return $imageInstance;
      }
code_tokens: protected function getImageInstance ( ) { //Tries to create the image instance try { $ imageInstance = $ this -> ImageManager -> make ( $ this -> path ) ; } catch ( NotReadableException $ e ) { $ message = __d ( 'thumber' , 'Unable to read image from file `{0}`' , rtr ( $ this -> path ) ) ; if ( $ e -> getMessage ( ) == 'Unsupported image type. GD driver is only able to decode JPG, PNG, GIF or WebP files.' ) { $ message = __d ( 'thumber' , 'Image type `{0}` is not supported by this driver' , mime_content_type ( $ this -> path ) ) ; } throw new RuntimeException ( $ message ) ; } return $ imageInstance ; }
docstring: Gets an `Image` instance
  @return \Intervention\Image\Image
  @throws RuntimeException
  @uses $ImageManager
  @uses $path
docstring_tokens: Gets an Image instance