Code Duplication    Length = 14-14 lines in 2 locations

lib/Model/Member.php 2 locations

@@ 226-239 (lines=14) @@
223
	 * @throws MemberAlreadyExistsException
224
	 * @throws MemberIsBlockedException
225
	 */
226
	public function hasToBeAbleToJoinTheCircle() {
227
228
		if ($this->getLevel() > 0) {
229
			throw new MemberAlreadyExistsException(
230
				$this->l10n->t("You are already a member of this circle")
231
			);
232
		}
233
234
		if ($this->getStatus() === Member::STATUS_BLOCKED) {
235
			throw new MemberIsBlockedException(
236
				$this->l10n->t("You have been blocked from this circle")
237
			);
238
		}
239
	}
240
241
242
	/**
@@ 245-258 (lines=14) @@
242
	/**
243
	 * @throws MemberAlreadyExistsException
244
	 */
245
	public function hasToBeInviteAble() {
246
247
		if ($this->getLevel() > 0) {
248
			throw new MemberAlreadyExistsException(
249
				$this->l10n->t("User is already a member of this circle")
250
			);
251
		}
252
253
		if ($this->getStatus() === Member::STATUS_INVITED) {
254
			throw new MemberAlreadyExistsException(
255
				$this->l10n->t("User is already invited into this circle")
256
			);
257
		}
258
	}
259
260
}
261