<?php
/**
 * Contract for a deterministic schema-validation rule.
 *
 * @package SEOvaultSEO\Schema\Validation
 */

namespace SEOvaultSEO\Schema\Validation;

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

/**
 * Defines one local validation rule.
 */
interface RuleInterface {

	/**
	 * Return a stable machine-readable rule code.
	 *
	 * @return string
	 */
	public function get_code();

	/**
	 * Determine whether this rule applies to a context.
	 *
	 * @param ValidationContext $context Validation context.
	 * @return bool
	 */
	public function supports( ValidationContext $context );

	/**
	 * Evaluate the context.
	 *
	 * @param ValidationContext $context Validation context.
	 * @return ValidationIssue[]
	 */
	public function evaluate( ValidationContext $context );
}
