Code Duplication    Length = 8-8 lines in 2 locations

lib/Service/CirclesService.php 2 locations

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