Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 109-116 (lines=8) @@
106
		return $this->enqueue_all_ids_as_action( 'jetpack_full_sync_woocommerce_order_items', $this->order_item_table_name, 'order_item_id', $this->get_where_sql( $config ), $max_items_to_enqueue, $state );
107
	}
108
109
	public function estimate_full_sync_actions( $config ) {
110
		global $wpdb;
111
112
		$query = "SELECT count(*) FROM $this->order_item_table_name WHERE " . $this->get_where_sql( $config );
113
		$count = $wpdb->get_var( $query );
114
115
		return (int) ceil( $count / self::ARRAY_CHUNK_SIZE );
116
	}
117
118
	private function get_where_sql( $config ) {
119
		return '1=1';

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

@@ 61-68 (lines=8) @@
58
		return $this->enqueue_all_ids_as_action( 'jetpack_full_sync_posts', $wpdb->posts, 'ID', $this->get_where_sql( $config ), $max_items_to_enqueue, $state );
59
	}
60
61
	public function estimate_full_sync_actions( $config ) {
62
		global $wpdb;
63
64
		$query = "SELECT count(*) FROM $wpdb->posts WHERE " . $this->get_where_sql( $config );
65
		$count = $wpdb->get_var( $query );
66
67
		return (int) ceil( $count / self::ARRAY_CHUNK_SIZE );
68
	}
69
70
	private function get_where_sql( $config ) {
71
		$where_sql = Jetpack_Sync_Settings::get_blacklisted_post_types_sql();