Code Duplication    Length = 5-5 lines in 2 locations

apps/sharebymail/lib/ShareByMailProvider.php 2 locations

@@ 256-260 (lines=5) @@
253
		$initiatorUser = $this->userManager->get($initiator);
254
		$ownerDisplayName = ($ownerUser instanceof IUser) ? $ownerUser->getDisplayName() : $owner;
255
		$initiatorDisplayName = ($initiatorUser instanceof IUser) ? $initiatorUser->getDisplayName() : $initiator;
256
		if ($owner === $initiator) {
257
			$subject = (string)$this->l->t('%s shared »%s« with you', array($ownerDisplayName, $filename));
258
		} else {
259
			$subject = (string)$this->l->t('%s shared »%s« with you on behalf of %s', array($ownerDisplayName, $filename, $initiatorDisplayName));
260
		}
261
262
		$message = $this->mailer->createMessage();
263
@@ 269-273 (lines=5) @@
266
		$emailTemplate->addHeader();
267
		$emailTemplate->addHeading($this->l->t('%s shared »%s« with you', [$ownerDisplayName, $filename]), false);
268
269
		if ($owner === $initiator) {
270
			$text = $this->l->t('%s shared »%s« with you.', [$ownerDisplayName, $filename]);
271
		} else {
272
			$text= $this->l->t('%s shared »%s« with you on behalf of %s.', [$ownerDisplayName, $filename, $initiator]);
273
		}
274
275
		$emailTemplate->addBodyText(
276
			$text . ' ' . $this->l->t('Click the button below to open it.'),