Code Duplication    Length = 12-12 lines in 2 locations

lib/private/Notification/Notification.php 2 locations

@@ 212-223 (lines=12) @@
209
	 * @throws \InvalidArgumentException if the subject or parameters are invalid
210
	 * @since 8.2.0
211
	 */
212
	public function setSubject($subject, array $parameters = []) {
213
		if (!is_string($subject) || $subject === '' || isset($subject[64])) {
214
			throw new \InvalidArgumentException('The given subject is invalid');
215
		}
216
		$this->subject = $subject;
217
218
		if (!is_array($parameters)) {
219
			throw new \InvalidArgumentException('The given subject parameters are invalid');
220
		}
221
		$this->subjectParameters = $parameters;
222
		return $this;
223
	}
224
225
	/**
226
	 * @return string
@@ 270-281 (lines=12) @@
267
	 * @throws \InvalidArgumentException if the message or parameters are invalid
268
	 * @since 8.2.0
269
	 */
270
	public function setMessage($message, array $parameters = []) {
271
		if (!is_string($message) || $message === '' || isset($message[64])) {
272
			throw new \InvalidArgumentException('The given message is invalid');
273
		}
274
		$this->message = $message;
275
276
		if (!is_array($parameters)) {
277
			throw new \InvalidArgumentException('The given message parameters are invalid');
278
		}
279
		$this->messageParameters = $parameters;
280
		return $this;
281
	}
282
283
	/**
284
	 * @return string