Code Duplication    Length = 8-8 lines in 2 locations

lib/Service/CirclesService.php 2 locations

@@ 629-636 (lines=8) @@
626
	 *
627
	 * @throws MemberIsNotOwnerException
628
	 */
629
	public function hasToBeOwner(Member $member) {
630
		if (!$this->groupManager->isAdmin($this->userId)
631
			&& $member->getLevel() < Member::LEVEL_OWNER) {
632
			throw new MemberIsNotOwnerException(
633
				$this->l10n->t('This member is not the owner of the circle')
634
			);
635
		}
636
	}
637
638
639
	/**
@@ 646-653 (lines=8) @@
643
	 *
644
	 * @throws MemberIsNotOwnerException
645
	 */
646
	public function hasToBeAdmin(Member $member) {
647
		if (!$this->groupManager->isAdmin($member->getUserId())
648
			&& $member->getLevel() < Member::LEVEL_ADMIN) {
649
			throw new MemberIsNotOwnerException(
650
				$this->l10n->t('This member is not an admin of the circle')
651
			);
652
		}
653
	}
654
}
655