Code Duplication    Length = 4-4 lines in 2 locations

lib/private/Share20/Manager.php 2 locations

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