Code Duplication    Length = 5-5 lines in 2 locations

src/Application.php 2 locations

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