Code Duplication    Length = 8-8 lines in 2 locations

lib/Service/CirclesService.php 2 locations

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