<?php
/**
 * SetupServiceProvider class.
 *
 * @package DokanKits\Core\DI\Providers
 * @since   3.0.0
 */

namespace DokanKits\Core\DI\Providers;

use DokanKits\Core\DI\BaseServiceProvider;
use DokanKits\Setup\Activator;
use DokanKits\Setup\Deactivator;
use DokanKits\Setup\Migrator;
use DokanKits\Setup\SystemCheck;

/**
 * Setup Service Provider
 *
 * @since   3.0.0
 * @package DokanKits\Providers
 */
class SetupServiceProvider extends BaseServiceProvider {

	/**
	 * Services provided by this provider
	 *
	 * @var array
	 */
	protected array $services = array(
		SystemCheck::class,
		Activator::class,
		Deactivator::class,
		Migrator::class,
	);

	/**
	 * Tags for this provider
	 *
	 * @var array
	 */
	protected array $tags = array( 'setup-service' );

	/**
	 * Register services
	 *
	 * @since 3.0.0
	 * @return void
	 */
	public function register(): void {
		foreach ( $this->services as $service ) {
			$definition = $this->share_with_implements_tags( $service );
			$this->add_tags( $definition, $this->tags );
		}
	}
}
