Code Duplication    Length = 10-12 lines in 2 locations

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

@@ 94-103 (lines=10) @@
91
		return (int) ceil( $count / self::ARRAY_CHUNK_SIZE );
92
	}
93
94
	private function get_where_sql( $config ) {
95
		$where_sql = Jetpack_Sync_Settings::get_blacklisted_post_types_sql();
96
97
		// config is a list of post IDs to sync
98
		if ( is_array( $config ) ) {
99
			$where_sql .= ' AND ID IN (' . implode( ',', array_map( 'intval', $config ) ) . ')';
100
		}
101
102
		return $where_sql;
103
	}
104
105
	function get_full_sync_actions() {
106
		return array( 'jetpack_full_sync_posts' );

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

@@ 406-417 (lines=12) @@
403
		return (int) ceil( $count / self::ARRAY_CHUNK_SIZE );
404
	}
405
406
	private function get_where_sql( $config ) {
407
		global $wpdb;
408
409
		$query = "meta_key = '{$wpdb->prefix}capabilities'";
410
411
		// config is a list of user IDs to sync
412
		if ( is_array( $config ) ) {
413
			$query .= ' AND user_id IN (' . implode( ',', array_map( 'intval', $config ) ) . ')';
414
		}
415
416
		return $query;
417
	}
418
419
	function get_full_sync_actions() {
420
		return array( 'jetpack_full_sync_users' );