Code Duplication    Length = 8-8 lines in 2 locations

lib/Service/CirclesService.php 2 locations

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