Code Duplication    Length = 6-6 lines in 2 locations

lib/Service/FilesService.php 2 locations

@@ 741-746 (lines=6) @@
738
			'application/epub+zip'
739
		];
740
741
		foreach ($textMimes as $mime) {
742
			if (strpos($mimeType, $mime) === 0) {
743
				$parsed = self::MIMETYPE_TEXT;
744
				throw new KnownFileMimeTypeException();
745
			}
746
		}
747
748
		$this->parseMimeTypeTextByExtension($mimeType, $extension, $parsed);
749
	}
@@ 827-832 (lines=6) @@
824
			'application/vnd.ms-excel'
825
		];
826
827
		foreach ($officeMimes as $mime) {
828
			if (strpos($mimeType, $mime) === 0) {
829
				$parsed = self::MIMETYPE_OFFICE;
830
				throw new KnownFileMimeTypeException();
831
			}
832
		}
833
	}
834
835