Code Duplication    Length = 6-7 lines in 2 locations

includes/class-give-comment.php 2 locations

@@ 124-130 (lines=7) @@
121
		}
122
123
		// Backward compatibility.
124
		if( is_numeric( $comment_args ) ) {
125
			$comment_args = array(
126
				'comment_parent' => $func_args[0],
127
				'comment_content' => $func_args[1],
128
				'comment_type'   => 'payment' === $func_args[2] ? 'donation' : $func_args[1],
129
			);
130
		}
131
132
		$comment_args = wp_parse_args(
133
			$comment_args,
@@ 277-282 (lines=6) @@
274
		}
275
276
		// Backward compatibility.
277
		if( is_numeric( $comment_args ) ) {
278
			$comment_args = array(
279
				'comment_parent' => $func_args[0],
280
				'comment_type'   => 'payment' === $func_args[1] ? 'donation' : $func_args[1],
281
			);
282
		}
283
284
		$comments = $wpdb->get_results( Give()->comment->db->get_sql( $comment_args ) );
285