Code Duplication    Length = 8-8 lines in 2 locations

lib/Service/CirclesService.php 2 locations

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