Code Duplication    Length = 5-5 lines in 2 locations

src/Application.php 2 locations

@@ 358-362 (lines=5) @@
355
                    $croppedImage = $this->cropImage($imageResource);
356
                    $result['status'] = imagejpeg($croppedImage, $path);
357
                    break;
358
                case 'png':
359
                    $imageResource = imagecreatefrompng($path);
360
                    $croppedImage = $this->cropTransparentImage($imageResource);
361
                    $result['status'] = imagepng($croppedImage, $path);
362
                    break;
363
                case 'gif':
364
                    $imageResource = imagecreatefromgif($path);
365
                    $croppedImage = $this->cropTransparentImage($imageResource);
@@ 363-367 (lines=5) @@
360
                    $croppedImage = $this->cropTransparentImage($imageResource);
361
                    $result['status'] = imagepng($croppedImage, $path);
362
                    break;
363
                case 'gif':
364
                    $imageResource = imagecreatefromgif($path);
365
                    $croppedImage = $this->cropTransparentImage($imageResource);
366
                    $result['status'] = imagegif($croppedImage, $path);
367
                    break;
368
            }
369
370
            // delete temporary images