Code Duplication    Length = 9-9 lines in 3 locations

lib/Service/FederatedLinkService.php 3 locations

@@ 618-626 (lines=9) @@
615
	 * @param Circle $circle
616
	 * @param FederatedLink $link
617
	 */
618
	private function checkUpdateLinkFromRemoteLinkRequestSent(Circle $circle, FederatedLink &$link) {
619
620
		if ($link->getStatus() !== FederatedLink::STATUS_REQUEST_SENT) {
621
			return;
622
		}
623
624
		$link->setStatus(FederatedLink::STATUS_REQUEST_DECLINED);
625
		$this->eventsService->onLinkRequestRejected($circle, $link);
626
	}
627
628
629
	/**
@@ 633-641 (lines=9) @@
630
	 * @param Circle $circle
631
	 * @param FederatedLink $link
632
	 */
633
	private function checkUpdateLinkFromRemoteLinkRequested(Circle $circle, FederatedLink &$link) {
634
635
		if ($link->getStatus() !== FederatedLink::STATUS_LINK_REQUESTED) {
636
			return;
637
		}
638
639
		$link->setStatus(FederatedLink::STATUS_LINK_REMOVE);
640
		$this->eventsService->onLinkRequestCanceled($circle, $link);
641
	}
642
643
644
	/**
@@ 648-656 (lines=9) @@
645
	 * @param Circle $circle
646
	 * @param FederatedLink $link
647
	 */
648
	private function checkUpdateLinkFromRemoteLinkDown(Circle $circle, FederatedLink &$link) {
649
650
		if ($link->getStatus() < FederatedLink::STATUS_LINK_DOWN) {
651
			return;
652
		}
653
654
		$link->setStatus(FederatedLink::STATUS_LINK_DOWN);
655
		$this->eventsService->onLinkDown($circle, $link);
656
	}
657
658
659
	/**