Code Duplication    Length = 5-5 lines in 3 locations

lib/private/legacy/image.php 3 locations

@@ 564-568 (lines=5) @@
561
				}
562
				break;
563
			case IMAGETYPE_JPEG:
564
				if (imagetypes() & IMG_JPG) {
565
					$this->resource = imagecreatefromjpeg($imagePath);
566
				} else {
567
					$this->logger->debug('OC_Image->loadFromFile, JPG images not supported: ' . $imagePath, array('app' => 'core'));
568
				}
569
				break;
570
			case IMAGETYPE_PNG:
571
				if (imagetypes() & IMG_PNG) {
@@ 581-585 (lines=5) @@
578
				}
579
				break;
580
			case IMAGETYPE_XBM:
581
				if (imagetypes() & IMG_XPM) {
582
					$this->resource = imagecreatefromxbm($imagePath);
583
				} else {
584
					$this->logger->debug('OC_Image->loadFromFile, XBM/XPM images not supported: ' . $imagePath, array('app' => 'core'));
585
				}
586
				break;
587
			case IMAGETYPE_WBMP:
588
				if (imagetypes() & IMG_WBMP) {
@@ 588-592 (lines=5) @@
585
				}
586
				break;
587
			case IMAGETYPE_WBMP:
588
				if (imagetypes() & IMG_WBMP) {
589
					$this->resource = imagecreatefromwbmp($imagePath);
590
				} else {
591
					$this->logger->debug('OC_Image->loadFromFile, WBMP images not supported: ' . $imagePath, array('app' => 'core'));
592
				}
593
				break;
594
			case IMAGETYPE_BMP:
595
				$this->resource = $this->imagecreatefrombmp($imagePath);