Code Duplication    Length = 8-8 lines in 2 locations

lib/Service/CirclesService.php 2 locations

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