Code Duplication    Length = 5-7 lines in 2 locations

src/wp-includes/class-wp-comment-query.php 1 location

@@ 637-643 (lines=7) @@
634
		$number = absint( $this->query_vars['number'] );
635
		$offset = absint( $this->query_vars['offset'] );
636
637
		if ( ! empty( $number ) ) {
638
			if ( $offset ) {
639
				$limits = 'LIMIT ' . $offset . ',' . $number;
640
			} else {
641
				$limits = 'LIMIT ' . $number;
642
			}
643
		}
644
645
		if ( $this->query_vars['count'] ) {
646
			$fields = 'COUNT(*)';

src/wp-includes/taxonomy.php 1 location

@@ 1472-1476 (lines=5) @@
1469
1470
	// Don't limit the query results when we have to descend the family tree.
1471
	if ( $number && ! $hierarchical && ! $child_of && '' === $parent ) {
1472
		if ( $offset ) {
1473
			$limits = 'LIMIT ' . $offset . ',' . $number;
1474
		} else {
1475
			$limits = 'LIMIT ' . $number;
1476
		}
1477
	} else {
1478
		$limits = '';
1479
	}