Code Duplication    Length = 6-6 lines in 5 locations

lib/Activity/Provider.php 5 locations

@@ 461-466 (lines=6) @@
458
		$remote = FederatedLink::fromJSON($params['link']);
459
460
		switch ($event->getSubject()) {
461
			case 'link_request_sent':
462
				return $this->parseCircleEvent(
463
					$event, $circle, $remote,
464
					$this->l10n->t('You sent a request to link {circle} with {remote}'),
465
					$this->l10n->t('{author} sent a request to link {circle} with {remote}')
466
				);
467
468
			case 'link_request_received';
469
				return $this->parseLinkEvent(
@@ 495-500 (lines=6) @@
492
					$this->l10n->t('The request to link {circle} with {remote} has been accepted')
493
				);
494
495
			case 'link_request_removed':
496
				return $this->parseCircleEvent(
497
					$event, $circle, $remote,
498
					$this->l10n->t('You dismissed the request to link {remote} with {circle}'),
499
					$this->l10n->t('{author} dismissed the request to link {remote} with {circle}')
500
				);
501
502
			case 'link_request_canceling':
503
				return $this->parseCircleEvent(
@@ 502-507 (lines=6) @@
499
					$this->l10n->t('{author} dismissed the request to link {remote} with {circle}')
500
				);
501
502
			case 'link_request_canceling':
503
				return $this->parseCircleEvent(
504
					$event, $circle, $remote,
505
					$this->l10n->t('You canceled the request to link {circle} with {remote}'),
506
					$this->l10n->t('{author} canceled the request to link {circle} with {remote}')
507
				);
508
509
			case 'link_request_accepting':
510
				return $this->parseCircleEvent(
@@ 509-514 (lines=6) @@
506
					$this->l10n->t('{author} canceled the request to link {circle} with {remote}')
507
				);
508
509
			case 'link_request_accepting':
510
				return $this->parseCircleEvent(
511
					$event, $circle, $remote,
512
					$this->l10n->t('You accepted the request to link {remote} with {circle}'),
513
					$this->l10n->t('{author} accepted the request to link {remote} with {circle}')
514
				);
515
516
			case 'link_up':
517
				return $this->parseLinkEvent(
@@ 530-535 (lines=6) @@
527
					)
528
				);
529
530
			case 'link_remove':
531
				return $this->parseCircleEvent(
532
					$event, $circle, $remote,
533
					$this->l10n->t('You closed the link between {circle} and {remote}'),
534
					$this->l10n->t('{author} closed the link between {circle} and {remote}')
535
				);
536
		}
537
538
		throw new InvalidArgumentException();