Code Duplication    Length = 9-9 lines in 3 locations

lib/Service/FederatedLinkService.php 3 locations

@@ 628-636 (lines=9) @@
625
	 * @param Circle $circle
626
	 * @param FederatedLink $link
627
	 */
628
	private function checkUpdateLinkFromRemoteLinkRequestSent(Circle $circle, FederatedLink &$link) {
629
630
		if ($link->getStatus() !== FederatedLink::STATUS_REQUEST_SENT) {
631
			return;
632
		}
633
634
		$link->setStatus(FederatedLink::STATUS_REQUEST_DECLINED);
635
		$this->eventsService->onLinkRequestRejected($circle, $link);
636
	}
637
638
639
	/**
@@ 643-651 (lines=9) @@
640
	 * @param Circle $circle
641
	 * @param FederatedLink $link
642
	 */
643
	private function checkUpdateLinkFromRemoteLinkRequested(Circle $circle, FederatedLink &$link) {
644
645
		if ($link->getStatus() !== FederatedLink::STATUS_LINK_REQUESTED) {
646
			return;
647
		}
648
649
		$link->setStatus(FederatedLink::STATUS_LINK_REMOVE);
650
		$this->eventsService->onLinkRequestCanceled($circle, $link);
651
	}
652
653
654
	/**
@@ 658-666 (lines=9) @@
655
	 * @param Circle $circle
656
	 * @param FederatedLink $link
657
	 */
658
	private function checkUpdateLinkFromRemoteLinkDown(Circle $circle, FederatedLink &$link) {
659
660
		if ($link->getStatus() < FederatedLink::STATUS_LINK_DOWN) {
661
			return;
662
		}
663
664
		$link->setStatus(FederatedLink::STATUS_LINK_DOWN);
665
		$this->eventsService->onLinkDown($circle, $link);
666
	}
667
668
669
	/**