Code Duplication    Length = 8-8 lines in 2 locations

lib/Service/CirclesService.php 2 locations

@@ 661-668 (lines=8) @@
658
	 *
659
	 * @throws MemberIsNotOwnerException
660
	 */
661
	public function hasToBeOwner(Member $member) {
662
		if (!$this->groupManager->isAdmin($this->userId)
663
			&& $member->getLevel() < Member::LEVEL_OWNER) {
664
			throw new MemberIsNotOwnerException(
665
				$this->l10n->t('This member is not the owner of the circle')
666
			);
667
		}
668
	}
669
670
671
	/**
@@ 678-685 (lines=8) @@
675
	 *
676
	 * @throws MemberIsNotOwnerException
677
	 */
678
	public function hasToBeAdmin(Member $member) {
679
		if (!$this->groupManager->isAdmin($member->getUserId())
680
			&& $member->getLevel() < Member::LEVEL_ADMIN) {
681
			throw new MemberIsNotOwnerException(
682
				$this->l10n->t('This member is not an admin of the circle')
683
			);
684
		}
685
	}
686
687
}
688