Code Duplication    Length = 8-8 lines in 2 locations

lib/Service/CirclesService.php 2 locations

@@ 590-597 (lines=8) @@
587
	 *
588
	 * @throws MemberIsNotOwnerException
589
	 */
590
	public function hasToBeOwner(Member $member) {
591
		if (!$this->groupManager->isAdmin($this->userId)
592
			&& $member->getLevel() < Member::LEVEL_OWNER) {
593
			throw new MemberIsNotOwnerException(
594
				$this->l10n->t('This member is not the owner of the circle')
595
			);
596
		}
597
	}
598
599
600
	/**
@@ 607-614 (lines=8) @@
604
	 *
605
	 * @throws MemberIsNotOwnerException
606
	 */
607
	public function hasToBeAdmin(Member $member) {
608
		if (!$this->groupManager->isAdmin($member->getUserId())
609
			&& $member->getLevel() < Member::LEVEL_ADMIN) {
610
			throw new MemberIsNotOwnerException(
611
				$this->l10n->t('This member is not an admin of the circle')
612
			);
613
		}
614
	}
615
616
617
	/**