Code Duplication    Length = 10-12 lines in 2 locations

sync/class.jetpack-sync-module-posts.php 1 location

@@ 47-56 (lines=10) @@
44
		return (int) ceil( $count / self::ARRAY_CHUNK_SIZE );
45
	}
46
47
	private function get_where_sql( $config ) {
48
		$where_sql = Jetpack_Sync_Settings::get_blacklisted_post_types_sql();
49
50
		// config is a list of post IDs to sync
51
		if ( is_array( $config ) ) {
52
			$where_sql   .= ' AND ID IN (' . implode( ',', array_map( 'intval', $config ) ) . ')';
53
		}
54
55
		return $where_sql;
56
	}
57
58
	function get_full_sync_actions() {
59
		return array( 'jetpack_full_sync_posts' );

sync/class.jetpack-sync-module-users.php 1 location

@@ 194-205 (lines=12) @@
191
		return (int) ceil( $count / self::ARRAY_CHUNK_SIZE );
192
	}
193
194
	private function get_where_sql( $config ) {
195
		global $wpdb;
196
197
		$query = "meta_key = '{$wpdb->prefix}capabilities'";
198
		
199
		// config is a list of user IDs to sync
200
		if ( is_array( $config ) ) {
201
			$query .= ' AND user_id IN (' . implode( ',', array_map( 'intval', $config ) ) . ')';
202
		}
203
204
		return $query;
205
	}
206
207
	function get_full_sync_actions() {
208
		return array( 'jetpack_full_sync_users' );