Code Duplication    Length = 8-8 lines in 2 locations

lib/Service/CirclesService.php 2 locations

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