1
0
Fork 0
mirror of https://github.com/archtechx/enums.git synced 2025-12-12 19:04:03 +00:00
Commit graph

3 commits

Author SHA1 Message Date
f52feccd85 add comment to test 2024-01-12 22:00:38 +01:00
ca01a71ea0 remove class name quoting in exceptions to match PHP behavior 2024-01-12 21:56:42 +01:00
Samuel Levy
cc5bba1912
Issue #4: Added From trait (#7)
* #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>
2022-03-23 22:18:58 +01:00