fix: derive contingent change signal from the sync diff
This commit is contained in:
@@ -13,19 +13,24 @@ readonly class ContingentSyncResult
|
||||
public bool $successful,
|
||||
public bool $changed,
|
||||
public int $added,
|
||||
public int $extended,
|
||||
public int $updated,
|
||||
public int $removed,
|
||||
public ?string $error = null,
|
||||
) {
|
||||
}
|
||||
|
||||
public static function synced(bool $changed, int $added, int $updated, int $removed): self
|
||||
/**
|
||||
* $added counts days newly stored within the horizon the previous run already reached;
|
||||
* $extended counts days beyond it, which is the rolling window growing rather than a change.
|
||||
*/
|
||||
public static function synced(bool $changed, int $added, int $extended, int $updated, int $removed): self
|
||||
{
|
||||
return new self(true, $changed, $added, $updated, $removed);
|
||||
return new self(true, $changed, $added, $extended, $updated, $removed);
|
||||
}
|
||||
|
||||
public static function failed(string $error): self
|
||||
{
|
||||
return new self(false, false, 0, 0, 0, $error);
|
||||
return new self(false, false, 0, 0, 0, 0, $error);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user