Code Duplication    Length = 12-12 lines in 2 locations

lib/Service/FilesService.php 2 locations

@@ 699-710 (lines=12) @@
696
	 *
697
	 * @throws NotPermittedException
698
	 */
699
	private function extractContentFromFilePDF(FilesDocument $document, File $file) {
700
701
		if ($this->parseMimeType($document->getMimeType()) !== self::MIMETYPE_PDF) {
702
			return;
703
		}
704
705
		if ($this->configService->getAppValue('files_pdf') !== '1') {
706
			return;
707
		}
708
709
		$document->setContent(base64_encode($file->getContent()), IndexDocument::ENCODED_BASE64);
710
	}
711
712
713
	/**
@@ 719-730 (lines=12) @@
716
	 *
717
	 * @throws NotPermittedException
718
	 */
719
	private function extractContentFromFileOffice(FilesDocument $document, File $file) {
720
721
		if ($this->configService->getAppValue('files_office') !== '1') {
722
			return;
723
		}
724
725
		if ($this->parseMimeType($document->getMimeType()) !== self::MIMETYPE_OFFICE) {
726
			return;
727
		}
728
729
		$document->setContent(base64_encode($file->getContent()), IndexDocument::ENCODED_BASE64);
730
	}
731
732
733
}