Code Duplication    Length = 8-8 lines in 2 locations

lib/Service/CirclesService.php 2 locations

@@ 621-628 (lines=8) @@
618
	 *
619
	 * @throws MemberIsNotOwnerException
620
	 */
621
	public function hasToBeOwner(Member $member) {
622
		if (!$this->groupManager->isAdmin($this->userId)
623
			&& $member->getLevel() < Member::LEVEL_OWNER) {
624
			throw new MemberIsNotOwnerException(
625
				$this->l10n->t('This member is not the owner of the circle')
626
			);
627
		}
628
	}
629
630
631
	/**
@@ 638-645 (lines=8) @@
635
	 *
636
	 * @throws MemberIsNotOwnerException
637
	 */
638
	public function hasToBeAdmin(Member $member) {
639
		if (!$this->groupManager->isAdmin($member->getUserId())
640
			&& $member->getLevel() < Member::LEVEL_ADMIN) {
641
			throw new MemberIsNotOwnerException(
642
				$this->l10n->t('This member is not an admin of the circle')
643
			);
644
		}
645
	}
646
}
647