Code Duplication    Length = 4-4 lines in 2 locations

lib/private/Share20/Manager.php 2 locations

@@ 318-321 (lines=4) @@
315
		}
316
317
		if ($share->getNode() instanceof \OCP\Files\File) {
318
			if ($share->getPermissions() & \OCP\Constants::PERMISSION_DELETE) {
319
				$message_t = $this->l->t('Files can’t be shared with delete permissions');
320
				throw new GenericShareException($message_t);
321
			}
322
			if ($share->getPermissions() & \OCP\Constants::PERMISSION_CREATE) {
323
				$message_t = $this->l->t('Files can’t be shared with create permissions');
324
				throw new GenericShareException($message_t);
@@ 322-325 (lines=4) @@
319
				$message_t = $this->l->t('Files can’t be shared with delete permissions');
320
				throw new GenericShareException($message_t);
321
			}
322
			if ($share->getPermissions() & \OCP\Constants::PERMISSION_CREATE) {
323
				$message_t = $this->l->t('Files can’t be shared with create permissions');
324
				throw new GenericShareException($message_t);
325
			}
326
		}
327
	}
328