Skip to content
Corex

AccountResult

Corex\Profile\Account\AccountResult · class · Add-ons layer

A typed, result-bearing outcome for every account operation (constitution: no UI infers success from a void call). Carries a machine code, a translated message, and — on success — the affected user id and any safe payload. Never contains a password, key, or session token.

ok(string $code, string $message, ?int $userId, array $data): self

Section titled “ok(string $code, string $message, ?int $userId, array $data): self”

fail(string $code, string $message, array $data): self

Section titled “fail(string $code, string $message, array $data): self”