1
0
Fork 0
mirror of https://github.com/archtechx/enums.git synced 2025-12-12 08:04:04 +00:00
enums/tests/Pest
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
..
FromTest.php Issue #4: Added From trait (#7) 2022-03-23 22:18:58 +01:00
InvokableCasesTest.php Extend functionality to work with pure enums (#6) 2022-03-23 21:42:35 +01:00
NamesTest.php Extend functionality to work with pure enums (#6) 2022-03-23 21:42:35 +01:00
OptionsTest.php Extend functionality to work with pure enums (#6) 2022-03-23 21:42:35 +01:00
ValuesTest.php Extend functionality to work with pure enums (#6) 2022-03-23 21:42:35 +01:00