Skip to content
PHP Ecosystem
Explore

HistoryPanelDifferenceCounts

API reference › Yii3 Debug › Comparison › HistoryPanelDifferenceCounts

final readonly classYii3\Debug\Comparison\HistoryPanelDifferenceCounts
Sourcesrc/Comparison/HistoryPanelDifferenceCounts.php

Immutable JSON-leaf difference counts for one captured panel.

PropertyTypeDescriptionDefined by
$added readonly constructorintJSON leaves present only in the target.HistoryPanelDifferenceCounts
$changed readonly constructorintJSON leaves present in both with a different value.HistoryPanelDifferenceCounts
$removed readonly constructorintJSON leaves present only in the baseline.HistoryPanelDifferenceCounts
$unchanged readonly constructorintJSON leaves identical in both.HistoryPanelDifferenceCounts
MethodDescriptionDefined by
__construct()Creates the JSON-leaf difference counts for one panel.HistoryPanelDifferenceCounts
differenceCount()Returns how many leaves differ between both captures.HistoryPanelDifferenceCounts
public function __construct(int $added, int $removed, int $changed, int $unchanged)

Creates the JSON-leaf difference counts for one panel.

Parameters

ParameterTypeDescription
$addedintJSON leaves present only in the target.
$removedintJSON leaves present only in the baseline.
$changedintJSON leaves present in both with a different value.
$unchangedintJSON leaves identical in both.
public function differenceCount(): int

Returns how many leaves differ between both captures.

Returns

int: Added, removed, and changed leaves combined; unchanged ones are excluded.