Code Duplication    Length = 8-8 lines in 2 locations

lib/Service/CirclesService.php 2 locations

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