Code Duplication    Length = 8-8 lines in 2 locations

lib/Service/CirclesService.php 2 locations

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