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 a way that will allow multiple extensions
in the future if required, with a single include file that will import
all extensions, or the option to include only specific extensions.
* #4 Added `From` trait
This adds the `from()` and `tryFrom()` methods to pure enums, and the `fromName()` and `tryFromName()` methods for all enum types.
* Code review changes
Dropped support for fragile indexes on pure enums
* Dropped unnecessary array_pop()
* import ValueError
* remove import
Co-authored-by: Samuel Štancl <samuel@archte.ch>
Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
* Extend functionality to work with pure enums
* Code review changes
Altered `::values()` to act like `::names()` for backed enums, code style fixes, general cleanups