Code Duplication    Length = 9-9 lines in 3 locations

lib/Service/FederatedLinkService.php 3 locations

@@ 435-443 (lines=9) @@
432
	 * @param Circle $circle
433
	 * @param FederatedLink $link
434
	 */
435
	private function checkUpdateLinkFromRemoteLinkRequestSent(Circle $circle, FederatedLink &$link) {
436
437
		if ($link->getStatus() !== FederatedLink::STATUS_REQUEST_SENT) {
438
			return;
439
		}
440
441
		$link->setStatus(FederatedLink::STATUS_REQUEST_DECLINED);
442
		$this->eventsService->onLinkRequestRejected($circle, $link);
443
	}
444
445
446
	/**
@@ 450-458 (lines=9) @@
447
	 * @param Circle $circle
448
	 * @param FederatedLink $link
449
	 */
450
	private function checkUpdateLinkFromRemoteLinkRequested(Circle $circle, FederatedLink &$link) {
451
452
		if ($link->getStatus() !== FederatedLink::STATUS_LINK_REQUESTED) {
453
			return;
454
		}
455
456
		$link->setStatus(FederatedLink::STATUS_LINK_REMOVE);
457
		$this->eventsService->onLinkRequestCanceled($circle, $link);
458
	}
459
460
461
	/**
@@ 465-473 (lines=9) @@
462
	 * @param Circle $circle
463
	 * @param FederatedLink $link
464
	 */
465
	private function checkUpdateLinkFromRemoteLinkDown(Circle $circle, FederatedLink &$link) {
466
467
		if ($link->getStatus() < FederatedLink::STATUS_LINK_DOWN) {
468
			return;
469
		}
470
471
		$link->setStatus(FederatedLink::STATUS_LINK_DOWN);
472
		$this->eventsService->onLinkDown($circle, $link);
473
	}
474
475
476
	/**