diff --git a/README.md b/README.md index f236d21..d6b57f8 100644 --- a/README.md +++ b/README.md @@ -194,18 +194,20 @@ Role::options(); // ['ADMINISTRATOR', 'SUBSCRIBER', 'GUEST'] The trait also adds the `stringOptions()` method that can be used for generating convenient string representations of your enum options: ```php // First argument is the callback, second argument is glue -// returns "PENDING => 0, DONE => 1" -Status::stringOptions(fn ($name, $value) => "$name => $value", ', '); +// returns "INCOMPLETE => 0, COMPLETED => 1, CANCELED => 2" +TaskStatus::stringOptions(fn ($name, $value) => "$name => $value", ', '); ``` For pure enums (non-backed), the name is used in place of `$value` (meaning that both `$name` and `$value` are the same). Both arguments for this method are optional, the glue defaults to `\n` and the callback defaults to generating HTML ` -// -Status::stringOptions(); // backed enum +// +// +// +TaskStatus::stringOptions(); // backed enum -// +// +// // Role::stringOptions(); // pure enum ```