Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 207-214 (lines=8) @@
204
	 * @param array $config Full sync configuration for this sync module.
205
	 * @return array Number of items yet to be enqueued.
206
	 */
207
	public function estimate_full_sync_actions( $config ) {
208
		global $wpdb;
209
210
		$query = "SELECT count(*) FROM $wpdb->posts WHERE " . $this->get_where_sql( $config );
211
		// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
212
		$count = $wpdb->get_var( $query );
213
214
		return (int) ceil( $count / self::ARRAY_CHUNK_SIZE );
215
	}
216
217
	/**

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

@@ 252-259 (lines=8) @@
249
	 * @param array $config Full sync configuration for this sync module.
250
	 * @return array Number of items yet to be enqueued.
251
	 */
252
	public function estimate_full_sync_actions( $config ) {
253
		global $wpdb;
254
255
		$query = "SELECT count(*) FROM $this->order_item_table_name WHERE " . $this->get_where_sql( $config );
256
		// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
257
		$count = $wpdb->get_var( $query );
258
259
		return (int) ceil( $count / self::ARRAY_CHUNK_SIZE );
260
	}
261
262
	/**