Code Duplication    Length = 13-15 lines in 2 locations

lib/Service/FilesService.php 2 locations

@@ 390-402 (lines=13) @@
387
	 * @return string
388
	 * @throws FileIsNotIndexableException
389
	 */
390
	private function getFileSource(Node $file): string {
391
		$source = '';
392
393
		try {
394
			$this->localFilesService->getFileSource($file, $source);
395
			$this->externalFilesService->getFileSource($file, $source);
396
			$this->groupFoldersService->getFileSource($file, $source);
397
		} catch (KnownFileSourceException $e) {
398
			/** we know the source, just leave. */
399
		}
400
401
		return $source;
402
	}
403
404
405
	/**
@@ 627-641 (lines=15) @@
624
	 *
625
	 * @throws FileIsNotIndexableException
626
	 */
627
	private function updateDocumentAccess(FilesDocument $document, Node $file) {
628
629
//		$index = $document->getIndex();
630
		// This should not be needed, let's assume we _need_ to update document access
631
//		if (!$index->isStatus(IIndex::INDEX_FULL)
632
//			&& !$index->isStatus(IIndex::INDEX_META)) {
633
//			return;
634
//		}
635
636
		$this->localFilesService->updateDocumentAccess($document, $file);
637
		$this->externalFilesService->updateDocumentAccess($document, $file);
638
		$this->groupFoldersService->updateDocumentAccess($document, $file);
639
640
		$this->updateShareNames($document, $file);
641
	}
642
643
644
	/**