$context */ private function __construct( public bool $allowed, public ?string $reasonCode = null, public ?string $failureCode = null, public ?string $message = null, public array $context = [], ) {} /** * @param array $context */ public static function allowed(array $context = []): self { return new self(allowed: true, context: $context); } /** * @param array $context */ public static function blocked(string $reasonCode, string $failureCode, string $message, array $context = []): self { return new self( allowed: false, reasonCode: $reasonCode, failureCode: $failureCode, message: $message, context: $context, ); } }