Code Duplication    Length = 12-12 lines in 2 locations

lib/Service/FilesService.php 2 locations

@@ 707-718 (lines=12) @@
704
	 *
705
	 * @throws NotPermittedException
706
	 */
707
	private function extractContentFromFilePDF(FilesDocument $document, File $file) {
708
709
		if ($this->parseMimeType($document->getMimeType()) !== self::MIMETYPE_PDF) {
710
			return;
711
		}
712
713
		if ($this->configService->getAppValue('files_pdf') !== '1') {
714
			return;
715
		}
716
717
		$document->setContent(base64_encode($file->getContent()), IndexDocument::ENCODED_BASE64);
718
	}
719
720
721
	/**
@@ 727-738 (lines=12) @@
724
	 *
725
	 * @throws NotPermittedException
726
	 */
727
	private function extractContentFromFileOffice(FilesDocument $document, File $file) {
728
729
		if ($this->configService->getAppValue('files_office') !== '1') {
730
			return;
731
		}
732
733
		if ($this->parseMimeType($document->getMimeType()) !== self::MIMETYPE_OFFICE) {
734
			return;
735
		}
736
737
		$document->setContent(base64_encode($file->getContent()), IndexDocument::ENCODED_BASE64);
738
	}
739
740
741
}