Code Duplication    Length = 13-13 lines in 2 locations

lib/private/Activity/Event.php 2 locations

@@ 261-273 (lines=13) @@
258
	 * @throws \InvalidArgumentException if the subject or parameters are invalid
259
	 * @since 11.0.0
260
	 */
261
	public function setRichSubject($subject, array $parameters = []) {
262
		if (!is_string($subject) || $subject === '') {
263
			throw new \InvalidArgumentException('The given parsed subject is invalid');
264
		}
265
		$this->subjectRich = $subject;
266
267
		if (!is_array($parameters)) {
268
			throw new \InvalidArgumentException('The given subject parameters are invalid');
269
		}
270
		$this->subjectRichParameters = $parameters;
271
272
		return $this;
273
	}
274
275
	/**
276
	 * @return string
@@ 352-364 (lines=13) @@
349
	 * @throws \InvalidArgumentException if the subject or parameters are invalid
350
	 * @since 11.0.0
351
	 */
352
	public function setRichMessage($message, array $parameters = []) {
353
		if (!is_string($message)) {
354
			throw new \InvalidArgumentException('The given parsed message is invalid');
355
		}
356
		$this->messageRich = $message;
357
358
		if (!is_array($parameters)) {
359
			throw new \InvalidArgumentException('The given message parameters are invalid');
360
		}
361
		$this->messageRichParameters = $parameters;
362
363
		return $this;
364
	}
365
366
	/**
367
	 * @return string