Code Duplication    Length = 8-10 lines in 2 locations

src/wp-includes/comment-template.php 2 locations

@@ 1968-1975 (lines=8) @@
1965
		$comments = (array) $comments;
1966
		if ( empty($comments) )
1967
			return;
1968
		if ( 'all' != $r['type'] ) {
1969
			$comments_by_type = separate_comments($comments);
1970
			if ( empty($comments_by_type[$r['type']]) )
1971
				return;
1972
			$_comments = $comments_by_type[$r['type']];
1973
		} else {
1974
			$_comments = $comments;
1975
		}
1976
	} else {
1977
		/*
1978
		 * If 'page' or 'per_page' has been passed, and does not match what's in $wp_query,
@@ 2007-2016 (lines=10) @@
2004
2005
				$comments = get_comments( $comment_args );
2006
2007
				if ( 'all' != $r['type'] ) {
2008
					$comments_by_type = separate_comments( $comments );
2009
					if ( empty( $comments_by_type[ $r['type'] ] ) ) {
2010
						return;
2011
					}
2012
2013
					$_comments = $comments_by_type[ $r['type'] ];
2014
				} else {
2015
					$_comments = $comments;
2016
				}
2017
			}
2018
2019
		// Otherwise, fall back on the comments from `$wp_query->comments`.