Code Duplication    Length = 8-8 lines in 2 locations

lib/Service/CirclesService.php 2 locations

@@ 602-609 (lines=8) @@
599
	 *
600
	 * @throws MemberIsNotOwnerException
601
	 */
602
	public function hasToBeOwner(Member $member) {
603
		if (!$this->groupManager->isAdmin($this->userId)
604
			&& $member->getLevel() < Member::LEVEL_OWNER) {
605
			throw new MemberIsNotOwnerException(
606
				$this->l10n->t('This member is not the owner of the circle')
607
			);
608
		}
609
	}
610
611
612
	/**
@@ 619-626 (lines=8) @@
616
	 *
617
	 * @throws MemberIsNotOwnerException
618
	 */
619
	public function hasToBeAdmin(Member $member) {
620
		if (!$this->groupManager->isAdmin($member->getUserId())
621
			&& $member->getLevel() < Member::LEVEL_ADMIN) {
622
			throw new MemberIsNotOwnerException(
623
				$this->l10n->t('This member is not an admin of the circle')
624
			);
625
		}
626
	}
627
}
628