Skip to content
docsv0.1.0

RunHistoryEntry

An entry in the run history: the adjudicated state of an individual run against the plan in effect at the time the history is read. `$state` is any `ObservationState`, but in practice a per-entry only takes the values `current`, `stale`, or `invalid` — `never_observed` describes the total absence of history (an empty `RunHistory`), it does not apply to an individual entry. This constraint is not validated here; it is documented by contract.

RunHistoryEntry::__construct()

public function __construct(Milpa\Governance\ObservationState $state, ?Milpa\Governance\GovernanceRun $run, ?string $reason):

Parameters

Parameters of __construct()
NameTypeDescription
$stateObservationStateAdjudicated state of the run (current | stale | invalid)
$run?GovernanceRunThe observed run; null only when the file was unreadable (INVALID lookup with no reconstructible run)
$reason?stringReadable reason for the state, when applicable (stale/invalid)

RunHistoryEntry::toArray()

public function toArray(): array

Serializes the entry to an array for storage or transmission.