HistoryPanelDifferenceCounts
API reference › Yii3 Debug › Comparison › HistoryPanelDifferenceCounts
Immutable JSON-leaf difference counts for one captured panel.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$added readonly constructor | int | JSON leaves present only in the target. | HistoryPanelDifferenceCounts |
$changed readonly constructor | int | JSON leaves present in both with a different value. | HistoryPanelDifferenceCounts |
$removed readonly constructor | int | JSON leaves present only in the baseline. | HistoryPanelDifferenceCounts |
$unchanged readonly constructor | int | JSON leaves identical in both. | HistoryPanelDifferenceCounts |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Creates the JSON-leaf difference counts for one panel. | HistoryPanelDifferenceCounts |
differenceCount() | Returns how many leaves differ between both captures. | HistoryPanelDifferenceCounts |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(int $added, int $removed, int $changed, int $unchanged)Creates the JSON-leaf difference counts for one panel.
Parameters
| Parameter | Type | Description |
|---|---|---|
$added | int | JSON leaves present only in the target. |
$removed | int | JSON leaves present only in the baseline. |
$changed | int | JSON leaves present in both with a different value. |
$unchanged | int | JSON leaves identical in both. |
differenceCount()
Section titled “differenceCount() ”public function differenceCount(): intReturns how many leaves differ between both captures.
Returns
int: Added, removed, and changed leaves combined; unchanged ones are excluded.