Code Duplication    Length = 8-8 lines in 2 locations

lib/Service/CirclesService.php 2 locations

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