Code Duplication    Length = 7-8 lines in 2 locations

settings/Controller/UsersController.php 2 locations

@@ 407-414 (lines=8) @@
404
		$codeMd5 = $message . ' ' . md5($signature);
405
406
		switch ($account) {
407
			case 'verify-twitter':
408
				$accountData[AccountManager::PROPERTY_TWITTER]['verified'] = AccountManager::VERIFICATION_IN_PROGRESS;
409
				$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):');
410
				$code = $codeMd5;
411
				$type = AccountManager::PROPERTY_TWITTER;
412
				$data = $accountData[AccountManager::PROPERTY_TWITTER]['value'];
413
				$accountData[AccountManager::PROPERTY_TWITTER]['signature'] = $signature;
414
				break;
415
			case 'verify-website':
416
				$accountData[AccountManager::PROPERTY_WEBSITE]['verified'] = AccountManager::VERIFICATION_IN_PROGRESS;
417
				$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):');
@@ 415-421 (lines=7) @@
412
				$data = $accountData[AccountManager::PROPERTY_TWITTER]['value'];
413
				$accountData[AccountManager::PROPERTY_TWITTER]['signature'] = $signature;
414
				break;
415
			case 'verify-website':
416
				$accountData[AccountManager::PROPERTY_WEBSITE]['verified'] = AccountManager::VERIFICATION_IN_PROGRESS;
417
				$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):');
418
				$type = AccountManager::PROPERTY_WEBSITE;
419
				$data = $accountData[AccountManager::PROPERTY_WEBSITE]['value'];
420
				$accountData[AccountManager::PROPERTY_WEBSITE]['signature'] = $signature;
421
				break;
422
			default:
423
				return new DataResponse([], Http::STATUS_BAD_REQUEST);
424
		}