Skip to content
docsv0.19.0

Reversibility

Whether the effect can be taken back — and this is NOT an opinion. An operation is not reversible because somebody says «we can undo it». It is reversible when a rollback contract exists, names the inverse operation, and has been exercised. Rod's examples are the calibration: · a local commit — plausibly Guaranteed, `git revert` exists and runs; · sending an email — IRREVERSIBLE. Sending a second one does not unsend the first; · publishing information — Compensatable at best. Deleting it does not delete the copies; · transferring money — irreversible, or subject to an external process. Never «reversible because we can ask for it back».

Reversibility::weight()

public function weight(): int

How much scrutiny this level demands — higher wins when profiles are joined.

Reversibility::cases()

public static function cases(): array

Reversibility::from()

public static function from(string|int $value): static

Parameters

Parameters of from()
NameTypeDescription
$valuestring|int

Reversibility::tryFrom()

public static function tryFrom(string|int $value): ?static

Parameters

Parameters of tryFrom()
NameTypeDescription
$valuestring|int