Code Duplication    Length = 4-4 lines in 2 locations

lib/private/Share20/Manager.php 2 locations

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