SnapshotComparison
API reference › Debug Core › Comparison › SnapshotComparison
Pairs request-summary metrics with per-panel structural differences for two captured snapshots.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$baseline readonly constructor | PHPForge\ | Baseline snapshot. | SnapshotComparison |
$metrics readonly constructor | list<SummaryMetricComparison> | Summary metric comparisons in canonical history order. | SnapshotComparison |
$panels readonly constructor | list<PanelComparison> | Panel comparisons in configured display order. | SnapshotComparison |
$target readonly constructor | PHPForge\ | Target snapshot. | SnapshotComparison |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
between() static | Compares two snapshots, combining summary metrics with panel structural differences. | SnapshotComparison |
hasDifferences() | Returns whether any summary metric or panel payload differs. | SnapshotComparison |
Method details
Section titled “Method details”between()
Section titled “between() ”public static function between(PHPForge\Debug\Storage\DebugSnapshot $baseline, PHPForge\Debug\Storage\DebugSnapshot $target, array<string, string> $panelLabels = []): selfCompares two snapshots, combining summary metrics with panel structural differences.
Parameters
| Parameter | Type | Description |
|---|---|---|
$baseline | PHPForge\ | Baseline snapshot. |
$target | PHPForge\ | Target snapshot. |
$panelLabels | array<string, | Display names indexed by stable panel ID, in display order. |
Returns
self: Comparison pairing summary metrics with per-panel structural differences.
hasDifferences()
Section titled “hasDifferences() ”public function hasDifferences(): boolReturns whether any summary metric or panel payload differs.
Returns
bool: true when at least one metric or panel differs; false otherwise.