Example #1
0
 /**
  * Validate that the file passed to the constructor is an image.
  *
  * @param \Fuzz\ImageResizer\File $file
  */
 private function validateFile(File $file)
 {
     if (!$file->isImage()) {
         http_response_code(400);
         throw new InvalidArgumentException('The file is not an image. Abort!');
     }
 }