Code Duplication    Length = 14-14 lines in 2 locations

lib/Model/Member.php 2 locations

@@ 255-268 (lines=14) @@
252
	 * @throws MemberAlreadyExistsException
253
	 * @throws MemberIsBlockedException
254
	 */
255
	public function hasToBeAbleToJoinTheCircle() {
256
257
		if ($this->getLevel() > 0) {
258
			throw new MemberAlreadyExistsException(
259
				$this->l10n->t("You are already a member of this circle")
260
			);
261
		}
262
263
		if ($this->getStatus() === Member::STATUS_BLOCKED) {
264
			throw new MemberIsBlockedException(
265
				$this->l10n->t("You have been blocked from this circle")
266
			);
267
		}
268
	}
269
270
271
	/**
@@ 274-287 (lines=14) @@
271
	/**
272
	 * @throws MemberAlreadyExistsException
273
	 */
274
	public function hasToBeInviteAble() {
275
276
		if ($this->getLevel() > 0) {
277
			throw new MemberAlreadyExistsException(
278
				$this->l10n->t("User is already a member of this circle")
279
			);
280
		}
281
282
		if ($this->getStatus() === Member::STATUS_INVITED) {
283
			throw new MemberAlreadyExistsException(
284
				$this->l10n->t("User is already invited into this circle")
285
			);
286
		}
287
	}
288
289
}
290