Code Duplication    Length = 9-9 lines in 4 locations

apps/files/lib/Service/TransferOwnership/TransferRequestManager.php 4 locations

@@ 292-300 (lines=9) @@
289
				}
290
				return $notification;
291
				break;
292
			case 'transfer_request_actioned_source':
293
				$notification->setParsedSubject((string) $l->t('Transfer completed'));
294
				$notification->setParsedMessage(
295
					(string) $l->t(
296
						'"%1$s" accepted your transfer of "%2$s" and it was completed',
297
						$notification->getMessageParameters())
298
				);
299
				return $notification;
300
				break;
301
			case 'transfer_request_actioned_destination':
302
				$notification->setParsedSubject((string) $l->t('Transfer completed'));
303
				$notification->setParsedMessage(
@@ 301-309 (lines=9) @@
298
				);
299
				return $notification;
300
				break;
301
			case 'transfer_request_actioned_destination':
302
				$notification->setParsedSubject((string) $l->t('Transfer completed'));
303
				$notification->setParsedMessage(
304
					(string) $l->t(
305
						'"%1$s" was transferred to you from "%2$s"',
306
						$notification->getMessageParameters())
307
				);
308
				return $notification;
309
				break;
310
			case 'transfer_request_failed_destination':
311
				$notification->setParsedSubject((string) $l->t('Transfer failed'));
312
				$notification->setParsedMessage(
@@ 310-318 (lines=9) @@
307
				);
308
				return $notification;
309
				break;
310
			case 'transfer_request_failed_destination':
311
				$notification->setParsedSubject((string) $l->t('Transfer failed'));
312
				$notification->setParsedMessage(
313
					(string) $l->t(
314
						'The transfer of "%1$s" from "%2$s failed. Ask the sender to try again."',
315
						$notification->getMessageParameters())
316
				);
317
				return $notification;
318
			break;
319
			case 'transfer_request_failed_source':
320
				$notification->setParsedSubject((string) $l->t('Transfer failed'));
321
				$notification->setParsedMessage(
@@ 319-327 (lines=9) @@
316
				);
317
				return $notification;
318
			break;
319
			case 'transfer_request_failed_source':
320
				$notification->setParsedSubject((string) $l->t('Transfer failed'));
321
				$notification->setParsedMessage(
322
					(string) $l->t(
323
						'The transfer of "%1$s" to "%2$s" failed with message: "%3$s"',
324
						$notification->getMessageParameters())
325
				);
326
				return $notification;
327
				break;
328
			default:
329
				throw new \InvalidArgumentException('Not a notifcation that can be formatted by this class');
330
		}