Code Duplication    Length = 12-12 lines in 2 locations

lib/Service/FilesService.php 2 locations

@@ 633-644 (lines=12) @@
630
	 *
631
	 * @throws NotPermittedException
632
	 */
633
	private function extractContentFromFilePDF(FilesDocument $document, File $file) {
634
635
		if ($this->parseMimeType($document->getMimeType()) !== self::MIMETYPE_PDF) {
636
			return;
637
		}
638
639
		if ($this->configService->getAppValue('files_pdf') !== '1') {
640
			return;
641
		}
642
643
		$document->setContent(base64_encode($file->getContent()), IndexDocument::ENCODED_BASE64);
644
	}
645
646
647
	/**
@@ 653-664 (lines=12) @@
650
	 *
651
	 * @throws NotPermittedException
652
	 */
653
	private function extractContentFromFileOffice(FilesDocument $document, File $file) {
654
655
		if ($this->configService->getAppValue('files_office') !== '1') {
656
			return;
657
		}
658
659
		if ($this->parseMimeType($document->getMimeType()) !== self::MIMETYPE_OFFICE) {
660
			return;
661
		}
662
663
		$document->setContent(base64_encode($file->getContent()), IndexDocument::ENCODED_BASE64);
664
	}
665
666
667
	/**