Code Duplication    Length = 8-8 lines in 2 locations

lib/Service/CirclesService.php 2 locations

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