<?php
/**
 * Operation application contract.
 *
 * @package ScheduledChanges
 */

namespace ScheduledChanges\Execution;

use ScheduledChanges\Domain\Operation\Operation;
use ScheduledChanges\Domain\Operation\TargetDefinition;
use ScheduledChanges\Provider\ExecutionContext;

/**
 * Execution port that applies and verifies one immutable operation. The
 * interface isolates the engine from provider dispatch and enables memory
 * appliers in lifecycle tests.
 */
interface OperationApplier {
	public function apply(
		Operation $operation,
		TargetDefinition $target,
		ExecutionContext $context,
		ExecutionState $state
	): OperationExecutionResult;
}
