Code Duplication    Length = 6-6 lines in 2 locations

lib/Service/FilesService.php 2 locations

@@ 751-756 (lines=6) @@
748
			'application/epub+zip'
749
		];
750
751
		foreach ($textMimes as $mime) {
752
			if (strpos($mimeType, $mime) === 0) {
753
				$parsed = self::MIMETYPE_TEXT;
754
				throw new KnownFileMimeTypeException();
755
			}
756
		}
757
758
		$this->parseMimeTypeTextByExtension($mimeType, $extension, $parsed);
759
	}
@@ 837-842 (lines=6) @@
834
			'application/vnd.ms-excel'
835
		];
836
837
		foreach ($officeMimes as $mime) {
838
			if (strpos($mimeType, $mime) === 0) {
839
				$parsed = self::MIMETYPE_OFFICE;
840
				throw new KnownFileMimeTypeException();
841
			}
842
		}
843
	}
844
845