Code Duplication    Length = 8-8 lines in 2 locations

lib/Service/CirclesService.php 2 locations

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