<?php
/**
 * Cleanup task contract.
 *
 * @package DatabaseCleanup
 */

namespace DatabaseCleanup\Includes;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

interface Cleanup_Task_Interface {

	public function get_id(): string;

	public function get_label(): string;

	public function get_description(): string;

	public function is_safe(): bool;

	/**
	 * @param array<string, mixed> $settings
	 * @return array{count:int, estimated_bytes:int, details:array<string, mixed>}
	 */
	public function scan( array $settings ): array;

	/**
	 * @param array<string, mixed> $settings
	 * @param int                  $batch_size
	 * @param mixed                $cursor
	 * @return array{deleted:int, done:bool, cursor:mixed, bytes:int}
	 */
	public function clean( array $settings, int $batch_size, mixed $cursor = null ): array;
}
