Code Duplication    Length = 8-8 lines in 2 locations

lib/Service/CirclesService.php 2 locations

@@ 640-647 (lines=8) @@
637
	 *
638
	 * @throws MemberIsNotOwnerException
639
	 */
640
	public function hasToBeOwner(Member $member) {
641
		if (!$this->groupManager->isAdmin($this->userId)
642
			&& $member->getLevel() < Member::LEVEL_OWNER) {
643
			throw new MemberIsNotOwnerException(
644
				$this->l10n->t('This member is not the owner of the circle')
645
			);
646
		}
647
	}
648
649
650
	/**
@@ 657-664 (lines=8) @@
654
	 *
655
	 * @throws MemberIsNotOwnerException
656
	 */
657
	public function hasToBeAdmin(Member $member) {
658
		if (!$this->groupManager->isAdmin($member->getUserId())
659
			&& $member->getLevel() < Member::LEVEL_ADMIN) {
660
			throw new MemberIsNotOwnerException(
661
				$this->l10n->t('This member is not an admin of the circle')
662
			);
663
		}
664
	}
665
}
666