Code Duplication    Length = 8-8 lines in 2 locations

lib/Service/CirclesService.php 2 locations

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