Skip to content
docsv0.1.0

GovernanceGate

A governance gate: a checkpoint that validates conformance with a rule. It can be bound to a specific point in the pipeline (CI/CD, check-in, review).

GovernanceGate::__construct()

public function __construct(string $id, string $description, Milpa\Governance\EnforcementTier $tier, ?string $boundTo = null, ?Milpa\Governance\GateOutcome $outcome = null):

Parameters

Parameters of __construct()
NameTypeDescription
$idstringUnique identifier of the gate
$descriptionstringDescription of what this gate validates
$tierEnforcementTierEnforcement level
$boundTo?stringPoint in the pipeline where it runs (e.g.: "ci:quality:phpstan")
$outcome?GateOutcomeResult of the last run (placeholder for forward-compat)

GovernanceGate::toArray()

public function toArray(): array

Serializes the gate to an array for storage or transmission.