Code Duplication    Length = 7-7 lines in 2 locations

packages/sync/src/modules/Terms.php 1 location

@@ 36-42 (lines=7) @@
33
		return $this->enqueue_all_ids_as_action( 'jetpack_full_sync_terms', $wpdb->term_taxonomy, 'term_taxonomy_id', $this->get_where_sql( $config ), $max_items_to_enqueue, $state );
34
	}
35
36
	private function get_where_sql( $config ) {
37
		if ( is_array( $config ) ) {
38
			return 'term_taxonomy_id IN (' . implode( ',', array_map( 'intval', $config ) ) . ')';
39
		}
40
41
		return '';
42
	}
43
44
	public function estimate_full_sync_actions( $config ) {
45
		global $wpdb;

packages/sync/src/modules/Comments.php 1 location

@@ 121-127 (lines=7) @@
118
		return (int) ceil( $count / self::ARRAY_CHUNK_SIZE );
119
	}
120
121
	private function get_where_sql( $config ) {
122
		if ( is_array( $config ) ) {
123
			return 'comment_ID IN (' . implode( ',', array_map( 'intval', $config ) ) . ')';
124
		}
125
126
		return null;
127
	}
128
129
	public function get_full_sync_actions() {
130
		return array( 'jetpack_full_sync_comments' );