Code Duplication    Length = 7-8 lines in 2 locations

settings/Controller/UsersController.php 2 locations

@@ 632-639 (lines=8) @@
629
		$codeMd5 = $message . ' ' . md5($signature);
630
631
		switch ($account) {
632
			case 'verify-twitter':
633
				$accountData[AccountManager::PROPERTY_TWITTER]['verified'] = AccountManager::VERIFICATION_IN_PROGRESS;
634
				$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):');
635
				$code = $codeMd5;
636
				$type = AccountManager::PROPERTY_TWITTER;
637
				$data = $accountData[AccountManager::PROPERTY_TWITTER]['value'];
638
				$accountData[AccountManager::PROPERTY_TWITTER]['signature'] = $signature;
639
				break;
640
			case 'verify-website':
641
				$accountData[AccountManager::PROPERTY_WEBSITE]['verified'] = AccountManager::VERIFICATION_IN_PROGRESS;
642
				$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):');
@@ 640-646 (lines=7) @@
637
				$data = $accountData[AccountManager::PROPERTY_TWITTER]['value'];
638
				$accountData[AccountManager::PROPERTY_TWITTER]['signature'] = $signature;
639
				break;
640
			case 'verify-website':
641
				$accountData[AccountManager::PROPERTY_WEBSITE]['verified'] = AccountManager::VERIFICATION_IN_PROGRESS;
642
				$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):');
643
				$type = AccountManager::PROPERTY_WEBSITE;
644
				$data = $accountData[AccountManager::PROPERTY_WEBSITE]['value'];
645
				$accountData[AccountManager::PROPERTY_WEBSITE]['signature'] = $signature;
646
				break;
647
			default:
648
				return new DataResponse([], Http::STATUS_BAD_REQUEST);
649
		}