Code Duplication    Length = 6-6 lines in 2 locations

lib/Service/FilesService.php 2 locations

@@ 730-735 (lines=6) @@
727
			'application/epub+zip'
728
		];
729
730
		foreach ($textMimes as $mime) {
731
			if (strpos($mimeType, $mime) === 0) {
732
				$parsed = self::MIMETYPE_TEXT;
733
				throw new KnownFileMimeTypeException();
734
			}
735
		}
736
737
		$this->parseMimeTypeTextByExtension($mimeType, $extension, $parsed);
738
	}
@@ 816-821 (lines=6) @@
813
			'application/vnd.ms-excel'
814
		];
815
816
		foreach ($officeMimes as $mime) {
817
			if (strpos($mimeType, $mime) === 0) {
818
				$parsed = self::MIMETYPE_OFFICE;
819
				throw new KnownFileMimeTypeException();
820
			}
821
		}
822
	}
823
824