enums icon indicating copy to clipboard operation
enums copied to clipboard

Helpers for making PHP enums more lovable.

Results 7 enums issues
Sort by recently updated
recently updated
newest added

For enum fields, I like to keep a comment in the database that has all the enum values and text. It might be useful to have a Trait with a...

This includes a PHPStan extension to add support for `InvokableCases` so that static analysis tools can understand the callable methods and their return types. The extension has been added in...

Filterable options, values or names

That way, users can create a trait such as: ```php /** * @method string description() */ #[Meta(Description::class) trait HasDescription {} ``` And use this across their enums as: ```diff enum...

good first issue
help wanted

There is a high likelihood that cases will be invoked many-many times per-request. Currently, it loops over all cases to find the one it needs on each invocation. In cases...

See https://github.com/archtechx/enums/pull/28#discussion_r1899183810

I'm using `InvokableCases` trait on my enum, when I use it like: `MyEnum::MyCase()`, I get a red wavy line under MyCase saying method is undefined, though it works well in...