<?php
namespace QuantumCache\Cli;

\defined( 'ABSPATH' ) || exit;

/**
 * Registers QuantumCache Free WP-CLI commands.
 *
 * Called from Plugin::init() inside the init action, gated on WP_CLI.
 * Uses flat subcommand registration (not a parent class) so Pro can freely
 * add its own subcommands under the same 'quantumcache' namespace.
 */
final class CommandRegistrar {

	public function register(): void {
		if ( ! defined( 'WP_CLI' ) || ! WP_CLI ) {
			return;
		}

		\WP_CLI::add_command( 'quantumcache flush',  new FlushCommand() );
		\WP_CLI::add_command( 'quantumcache status', new StatusCommand() );
	}
}
