Code Duplication    Length = 6-6 lines in 2 locations

lib/Service/FilesService.php 2 locations

@@ 775-780 (lines=6) @@
772
			'application/epub+zip'
773
		];
774
775
		foreach ($textMimes as $mime) {
776
			if (strpos($mimeType, $mime) === 0) {
777
				$parsed = self::MIMETYPE_TEXT;
778
				throw new KnownFileMimeTypeException();
779
			}
780
		}
781
782
		$this->parseMimeTypeTextByExtension($mimeType, $extension, $parsed);
783
	}
@@ 861-866 (lines=6) @@
858
			'application/vnd.ms-excel'
859
		];
860
861
		foreach ($officeMimes as $mime) {
862
			if (strpos($mimeType, $mime) === 0) {
863
				$parsed = self::MIMETYPE_OFFICE;
864
				throw new KnownFileMimeTypeException();
865
			}
866
		}
867
	}
868
869