Code Duplication    Length = 8-8 lines in 2 locations

lib/Service/CirclesService.php 2 locations

@@ 615-622 (lines=8) @@
612
	 *
613
	 * @throws MemberIsNotOwnerException
614
	 */
615
	public function hasToBeOwner(Member $member) {
616
		if (!$this->groupManager->isAdmin($this->userId)
617
			&& $member->getLevel() < Member::LEVEL_OWNER) {
618
			throw new MemberIsNotOwnerException(
619
				$this->l10n->t('This member is not the owner of the circle')
620
			);
621
		}
622
	}
623
624
625
	/**
@@ 632-639 (lines=8) @@
629
	 *
630
	 * @throws MemberIsNotOwnerException
631
	 */
632
	public function hasToBeAdmin(Member $member) {
633
		if (!$this->groupManager->isAdmin($member->getUserId())
634
			&& $member->getLevel() < Member::LEVEL_ADMIN) {
635
			throw new MemberIsNotOwnerException(
636
				$this->l10n->t('This member is not an admin of the circle')
637
			);
638
		}
639
	}
640
}
641