Code Duplication    Length = 17-17 lines in 2 locations

projects/plugins/jetpack/_inc/lib/functions.wp-notify.php 2 locations

@@ 152-168 (lines=17) @@
149
150
	// Original function modified: Consider $moderate_on_wpcom when building $notify_message.
151
	if ( user_can( $post->post_author, 'edit_comment', $comment->comment_ID ) ) {
152
		if ( EMPTY_TRASH_DAYS ) {
153
			$notify_message .= sprintf(
154
				/* translators: Placeholder is the edit URL */
155
				__( 'Trash it: %s' ),
156
				$moderate_on_wpcom
157
				? str_replace( '__action__', 'trash', $base_wpcom_edit_comment_url )
158
				: admin_url( "comment.php?action=trash&c={$comment->comment_ID}#wpbody-content" )
159
			) . "\r\n";
160
		} else {
161
			$notify_message .= sprintf(
162
				/* translators: Placeholder is the edit URL */
163
				__( 'Delete it: %s' ),
164
				$moderate_on_wpcom
165
				? str_replace( '__action__', 'delete', $base_wpcom_edit_comment_url )
166
				: admin_url( "comment.php?action=delete&c={$comment->comment_ID}#wpbody-content" )
167
			) . "\r\n";
168
		}
169
		$notify_message .= sprintf(
170
			/* translators: Placeholder is the edit URL */
171
			__( 'Spam it: %s' ),
@@ 327-343 (lines=17) @@
324
		: admin_url( "comment.php?action=approve&c={$comment_id}#wpbody-content" )
325
	) . "\r\n";
326
327
	if ( EMPTY_TRASH_DAYS ) {
328
		$notify_message .= sprintf(
329
			/* translators: Comment moderation. 1: Comment action URL */
330
			__( 'Trash it: %s' ),
331
			$moderate_on_wpcom
332
			? str_replace( '__action__', 'trash', $base_wpcom_edit_comment_url )
333
			: admin_url( "comment.php?action=trash&c={$comment_id}#wpbody-content" )
334
		) . "\r\n";
335
	} else {
336
		$notify_message .= sprintf(
337
			/* translators: Comment moderation. 1: Comment action URL */
338
			__( 'Delete it: %s' ),
339
			$moderate_on_wpcom
340
			? str_replace( '__action__', 'delete', $base_wpcom_edit_comment_url )
341
			: admin_url( "comment.php?action=delete&c={$comment_id}#wpbody-content" )
342
		) . "\r\n";
343
	}
344
345
	$notify_message .= sprintf(
346
		/* translators: Comment moderation. 1: Comment action URL */