Code Duplication    Length = 7-8 lines in 2 locations

settings/Controller/UsersController.php 2 locations

@@ 657-664 (lines=8) @@
654
		$codeMd5 = $message . ' ' . md5($signature);
655
656
		switch ($account) {
657
			case 'verify-twitter':
658
				$accountData[AccountManager::PROPERTY_TWITTER]['verified'] = AccountManager::VERIFICATION_IN_PROGRESS;
659
				$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):');
660
				$code = $codeMd5;
661
				$type = AccountManager::PROPERTY_TWITTER;
662
				$data = $accountData[AccountManager::PROPERTY_TWITTER]['value'];
663
				$accountData[AccountManager::PROPERTY_TWITTER]['signature'] = $signature;
664
				break;
665
			case 'verify-website':
666
				$accountData[AccountManager::PROPERTY_WEBSITE]['verified'] = AccountManager::VERIFICATION_IN_PROGRESS;
667
				$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):');
@@ 665-671 (lines=7) @@
662
				$data = $accountData[AccountManager::PROPERTY_TWITTER]['value'];
663
				$accountData[AccountManager::PROPERTY_TWITTER]['signature'] = $signature;
664
				break;
665
			case 'verify-website':
666
				$accountData[AccountManager::PROPERTY_WEBSITE]['verified'] = AccountManager::VERIFICATION_IN_PROGRESS;
667
				$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):');
668
				$type = AccountManager::PROPERTY_WEBSITE;
669
				$data = $accountData[AccountManager::PROPERTY_WEBSITE]['value'];
670
				$accountData[AccountManager::PROPERTY_WEBSITE]['signature'] = $signature;
671
				break;
672
			default:
673
				return new DataResponse([], Http::STATUS_BAD_REQUEST);
674
		}