Code Duplication    Length = 7-8 lines in 2 locations

settings/Controller/UsersController.php 2 locations

@@ 413-420 (lines=8) @@
410
		$codeMd5 = $message . ' ' . md5($signature);
411
412
		switch ($account) {
413
			case 'verify-twitter':
414
				$accountData[AccountManager::PROPERTY_TWITTER]['verified'] = AccountManager::VERIFICATION_IN_PROGRESS;
415
				$msg = $this->l10n->t('In order to verify your Twitter account, post the following tweet on Twitter (please make sure to post it without any line breaks):');
416
				$code = $codeMd5;
417
				$type = AccountManager::PROPERTY_TWITTER;
418
				$data = $accountData[AccountManager::PROPERTY_TWITTER]['value'];
419
				$accountData[AccountManager::PROPERTY_TWITTER]['signature'] = $signature;
420
				break;
421
			case 'verify-website':
422
				$accountData[AccountManager::PROPERTY_WEBSITE]['verified'] = AccountManager::VERIFICATION_IN_PROGRESS;
423
				$msg = $this->l10n->t('In order to verify your Website, store the following content in your web-root at \'.well-known/CloudIdVerificationCode.txt\' (please make sure that the complete text is in one line):');
@@ 421-427 (lines=7) @@
418
				$data = $accountData[AccountManager::PROPERTY_TWITTER]['value'];
419
				$accountData[AccountManager::PROPERTY_TWITTER]['signature'] = $signature;
420
				break;
421
			case 'verify-website':
422
				$accountData[AccountManager::PROPERTY_WEBSITE]['verified'] = AccountManager::VERIFICATION_IN_PROGRESS;
423
				$msg = $this->l10n->t('In order to verify your Website, store the following content in your web-root at \'.well-known/CloudIdVerificationCode.txt\' (please make sure that the complete text is in one line):');
424
				$type = AccountManager::PROPERTY_WEBSITE;
425
				$data = $accountData[AccountManager::PROPERTY_WEBSITE]['value'];
426
				$accountData[AccountManager::PROPERTY_WEBSITE]['signature'] = $signature;
427
				break;
428
			default:
429
				return new DataResponse([], Http::STATUS_BAD_REQUEST);
430
		}