Code Duplication    Length = 4-4 lines in 2 locations

lib/private/Share20/Manager.php 2 locations

@@ 267-270 (lines=4) @@
264
		}
265
266
		if ($share->getNode() instanceof \OCP\Files\File) {
267
			if ($share->getPermissions() & \OCP\Constants::PERMISSION_DELETE) {
268
				$message_t = $this->l->t('Files can\'t be shared with delete permissions');
269
				throw new GenericShareException($message_t);
270
			}
271
			if ($share->getPermissions() & \OCP\Constants::PERMISSION_CREATE) {
272
				$message_t = $this->l->t('Files can\'t be shared with create permissions');
273
				throw new GenericShareException($message_t);
@@ 271-274 (lines=4) @@
268
				$message_t = $this->l->t('Files can\'t be shared with delete permissions');
269
				throw new GenericShareException($message_t);
270
			}
271
			if ($share->getPermissions() & \OCP\Constants::PERMISSION_CREATE) {
272
				$message_t = $this->l->t('Files can\'t be shared with create permissions');
273
				throw new GenericShareException($message_t);
274
			}
275
		}
276
	}
277