Code Duplication    Length = 9-9 lines in 4 locations

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

@@ 271-279 (lines=9) @@
268
				}
269
				return $notification;
270
				break;
271
			case 'transfer_request_actioned_source':
272
				$notification->setParsedSubject((string) $l->t('Transfer completed'));
273
				$notification->setParsedMessage(
274
					(string) $l->t(
275
						'"%1$s" accepted your transfer of "%2$s" and it was completed',
276
						$notification->getMessageParameters())
277
				);
278
				return $notification;
279
				break;
280
			case 'transfer_request_actioned_destination':
281
				$notification->setParsedSubject((string) $l->t('Transfer completed'));
282
				$notification->setParsedMessage(
@@ 280-288 (lines=9) @@
277
				);
278
				return $notification;
279
				break;
280
			case 'transfer_request_actioned_destination':
281
				$notification->setParsedSubject((string) $l->t('Transfer completed'));
282
				$notification->setParsedMessage(
283
					(string) $l->t(
284
						'"%1$s" was transferred to you from "%2$s"',
285
						$notification->getMessageParameters())
286
				);
287
				return $notification;
288
				break;
289
			case 'transfer_request_failed_destination':
290
				$notification->setParsedSubject((string) $l->t('Transfer failed'));
291
				$notification->setParsedMessage(
@@ 289-297 (lines=9) @@
286
				);
287
				return $notification;
288
				break;
289
			case 'transfer_request_failed_destination':
290
				$notification->setParsedSubject((string) $l->t('Transfer failed'));
291
				$notification->setParsedMessage(
292
					(string) $l->t(
293
						'The transfer of "%1$s" from "%2$s failed. Ask the sender to try again."',
294
						$notification->getMessageParameters())
295
				);
296
				return $notification;
297
			break;
298
			case 'transfer_request_failed_source':
299
				$notification->setParsedSubject((string) $l->t('Transfer failed'));
300
				$notification->setParsedMessage(
@@ 298-306 (lines=9) @@
295
				);
296
				return $notification;
297
			break;
298
			case 'transfer_request_failed_source':
299
				$notification->setParsedSubject((string) $l->t('Transfer failed'));
300
				$notification->setParsedMessage(
301
					(string) $l->t(
302
						'The transfer of "%1$s" to "%2$s" failed with message: "%3$s"',
303
						$notification->getMessageParameters())
304
				);
305
				return $notification;
306
				break;
307
			default:
308
				throw new \InvalidArgumentException('Not a notifcation that can be formatted by this class');
309
		}