Code Duplication    Length = 7-8 lines in 2 locations

settings/Controller/UsersController.php 2 locations

@@ 615-622 (lines=8) @@
612
		$codeMd5 = $message . ' ' . md5($signature);
613
614
		switch ($account) {
615
			case 'verify-twitter':
616
				$accountData[AccountManager::PROPERTY_TWITTER]['verified'] = AccountManager::VERIFICATION_IN_PROGRESS;
617
				$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):');
618
				$code = $codeMd5;
619
				$type = AccountManager::PROPERTY_TWITTER;
620
				$data = $accountData[AccountManager::PROPERTY_TWITTER]['value'];
621
				$accountData[AccountManager::PROPERTY_TWITTER]['signature'] = $signature;
622
				break;
623
			case 'verify-website':
624
				$accountData[AccountManager::PROPERTY_WEBSITE]['verified'] = AccountManager::VERIFICATION_IN_PROGRESS;
625
				$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):');
@@ 623-629 (lines=7) @@
620
				$data = $accountData[AccountManager::PROPERTY_TWITTER]['value'];
621
				$accountData[AccountManager::PROPERTY_TWITTER]['signature'] = $signature;
622
				break;
623
			case 'verify-website':
624
				$accountData[AccountManager::PROPERTY_WEBSITE]['verified'] = AccountManager::VERIFICATION_IN_PROGRESS;
625
				$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):');
626
				$type = AccountManager::PROPERTY_WEBSITE;
627
				$data = $accountData[AccountManager::PROPERTY_WEBSITE]['value'];
628
				$accountData[AccountManager::PROPERTY_WEBSITE]['signature'] = $signature;
629
				break;
630
			default:
631
				return new DataResponse([], Http::STATUS_BAD_REQUEST);
632
		}