Code Duplication    Length = 12-12 lines in 2 locations

lib/private/Notification/Notification.php 2 locations

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