File "BatchQueryOffset.php"

Full Path: /home/vantageo/public_html/cache/cache/cache/.wp-cli/wp-content/plugins/facebook-for-woocommerce/vendor/woocommerce/action-scheduler-job-framework/src/Utilities/BatchQueryOffset.php
File size: 480 bytes
MIME-type: text/x-php
Charset: utf-8

<?php
declare( strict_types=1 );

namespace Automattic\WooCommerce\ActionSchedulerJobFramework\Utilities;

/**
 * Trait BatchQueryOffset
 *
 * @since 1.0.0
 */
trait BatchQueryOffset {

	use BatchSize;

	/**
	 * Get the query offset based on a given batch number and the specified batch size.
	 *
	 * @param int $batch_number
	 *
	 * @return int
	 */
	protected function get_query_offset( int $batch_number ): int {
		return $this->get_batch_size() * ( $batch_number - 1 );
	}

}