Commit graph

31 commits

Author SHA1 Message Date
Jérémy Munsch
606c380e97
Bumped for php 8.2 + fix unit test and phpcs 2023-06-02 12:12:37 +02:00
Jérémy Munsch
8b25893b99
phpcs fix 2023-05-30 09:40:09 +02:00
Jérémy Munsch
34965dee37
Fix #1
- Strict check for enum duplicates
- Added check for empty enum definition
- Added check for duplicated enum definition
2021-11-18 17:51:58 +01:00
Jérémy Munsch
1e2e9bdecf
Reintroduce getRouteKey to handle router with model + tests 2021-09-20 22:37:12 +02:00
163eeabcd1
Add make:enum console command 2021-09-12 19:21:54 +02:00
03bac5ba89
Hanle Enum not routable exception, instead of just resolvinf enum with null variables 2021-09-12 02:23:40 +02:00
fdfb6af639
Full unit test with 100% coverage 2021-09-12 02:23:40 +02:00
a7617753b1
Fix BaseEnumRule to really check if enum passed to constructor extends BaseEnum 2021-09-12 02:23:40 +02:00
19108c833e
add some comments on exceptions 2021-09-12 02:23:40 +02:00
9c91bb3659
Change package translations to use php files 2021-09-12 02:23:40 +02:00
0bb9a6f9b8
BaseEnum: remove unused herited closure case 2021-09-12 02:23:40 +02:00
7bbbe28e27
BaseEnum : correction on code comments 2021-09-12 02:23:40 +02:00
e687db37e7
CastsEnums : refactorize code
correction on code coments
2021-09-12 02:23:40 +02:00
1a5be20be2
CastsEnums : remove breaking attributes 2021-09-12 02:23:40 +02:00
5e3f825dca
EnumIsValidRule : fix int casting 2021-09-12 02:23:40 +02:00
b3f54a65c5
BaseEnumRoutable : case to int only if is really an integer 2021-09-12 02:23:40 +02:00
4cc27e6769
BaseEnumRoutable : remove unused getEnumName
add NotImplementedException for all unsued methods
2021-09-12 02:23:40 +02:00
3e654f5d3c
BaseEnum : Remove unused __call 2021-09-12 02:23:39 +02:00
bb09844610
fix cast enum phpdoc 2021-09-12 02:23:39 +02:00
5793cf591f
Type hint __get for label and value on Base Enum 2021-09-12 02:23:39 +02:00
d8402c3397
Fixes from code analyzer 2021-09-12 02:23:39 +02:00
4382d1c6fe
Refactor code and cleanup 2021-09-12 02:23:39 +02:00
Jérémy Munsch
036cc602c0 Base Enum routable bump to version 2.0.0 2021-08-13 12:11:43 +02:00
Jérémy Munsch
f9e2b960d8 Get route key 2021-04-06 16:35:59 +02:00
Jérémy Munsch
7280504931 Validation rule EnumIsValidRule 2021-03-17 00:52:03 +01:00
Jérémy Munsch
df8022c495 Change ToJson on Base Enum 2021-03-04 17:25:04 +01:00
Jérémy Munsch
a79173ec38 fixed performances issue on toValues and toLabels 2021-03-03 09:42:24 +01:00
Jérémy Munsch
45a1ccd27f Breaking change
BaseEnum to Array indexes where cast to integers
  This would break enum values that where numeric strings
  ToArray now returns a list of BaseEnums
2021-03-02 21:24:04 +01:00
Jérémy Munsch
43e8dff61c Fix wrong namespace usage in castsEnums.php 2021-03-01 14:28:40 +01:00
Jérémy Munsch
4ae3642259 Add trait Cast Enum 2021-03-01 12:15:43 +01:00
Jérémy Munsch
f6d042b16c Initial commit 2021-03-01 07:55:10 +01:00