Code Duplication    Length = 4-4 lines in 2 locations

lib/private/Share20/Manager.php 2 locations

@@ 277-280 (lines=4) @@
274
		}
275
276
		if ($share->getNode() instanceof \OCP\Files\File) {
277
			if ($share->getPermissions() & \OCP\Constants::PERMISSION_DELETE) {
278
				$message_t = $this->l->t('Files can\'t be shared with delete permissions');
279
				throw new GenericShareException($message_t);
280
			}
281
			if ($share->getPermissions() & \OCP\Constants::PERMISSION_CREATE) {
282
				$message_t = $this->l->t('Files can\'t be shared with create permissions');
283
				throw new GenericShareException($message_t);
@@ 281-284 (lines=4) @@
278
				$message_t = $this->l->t('Files can\'t be shared with delete permissions');
279
				throw new GenericShareException($message_t);
280
			}
281
			if ($share->getPermissions() & \OCP\Constants::PERMISSION_CREATE) {
282
				$message_t = $this->l->t('Files can\'t be shared with create permissions');
283
				throw new GenericShareException($message_t);
284
			}
285
		}
286
	}
287