Code Duplication    Length = 8-8 lines in 2 locations

lib/Service/CirclesService.php 2 locations

@@ 576-583 (lines=8) @@
573
	 *
574
	 * @throws MemberIsNotOwnerException
575
	 */
576
	public function hasToBeOwner(Member $member) {
577
		if (!$this->groupManager->isAdmin($this->userId)
578
			&& $member->getLevel() < Member::LEVEL_OWNER) {
579
			throw new MemberIsNotOwnerException(
580
				$this->l10n->t('This member is not the owner of the circle')
581
			);
582
		}
583
	}
584
585
586
	/**
@@ 593-600 (lines=8) @@
590
	 *
591
	 * @throws MemberIsNotOwnerException
592
	 */
593
	public function hasToBeAdmin(Member $member) {
594
		if (!$this->groupManager->isAdmin($member->getUserId())
595
			&& $member->getLevel() < Member::LEVEL_ADMIN) {
596
			throw new MemberIsNotOwnerException(
597
				$this->l10n->t('This member is not an admin of the circle')
598
			);
599
		}
600
	}
601
}
602