f52feccd85
add comment to test
2024-01-12 22:00:38 +01:00
84d56bf843
migrate pest config
2024-01-12 21:57:10 +01:00
ca01a71ea0
remove class name quoting in exceptions to match PHP behavior
2024-01-12 21:56:42 +01:00
79a410dd01
update ci job name
2024-01-12 21:34:24 +01:00
530316ee58
Merge branch 'comparable' of github.com:hungthai1401/enums into comparable
2024-01-12 21:32:32 +01:00
bc9054277c
test more PHP versions in CI
2024-01-12 21:31:46 +01:00
Samuel Štancl
214e22c2ca
Merge branch 'master' into comparable
2024-01-12 21:24:58 +01:00
6f61461c50
improve Comparable logic
2024-01-12 21:23:50 +01:00
parth gohil
fb521d2dcb
Install larastan/larastan ( #21 )
2023-12-08 14:33:51 +01:00
Thai Nguyen Hung
c0a459864b
ci: globally use php-cs-fixer
2023-06-08 10:35:02 +07:00
Thai Nguyen Hung
8b90e21803
chore: add Comparable usage in README
2023-06-08 09:57:36 +07:00
Thai Nguyen Hung
46944dc5f4
ci: php-cs-fixer in repository scope
2023-06-08 09:31:53 +07:00
Thai Nguyen Hung
161f04b719
test: comparable enum
2023-06-08 09:30:57 +07:00
Thai Nguyen Hung
b9f33f36a3
feat: comparable enum
2023-06-08 09:30:31 +07:00
lukinovec
922b6abdc1
Remove L8 support ( #19 )
2023-02-16 17:07:26 +01:00
lukinovec
475f45e682
Add L10 support ( #18 )
2023-02-15 14:05:41 +01:00
colinmackinlay
646944e56e
Correct typo/error in README.md ( #16 )
2022-11-08 00:56:34 +01:00
Samuel Levy
373a86a16e
Added "Invokable Cases" PHPStan extension ( #13 )
...
* Added "Invokable Cases" PHPStan extension
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.
* Added "Invokable Cases" PHPStan extension testing
2022-08-25 00:27:44 +02:00
Samuel Štancl
7e17b84451
Static analysis
2022-03-29 20:34:54 +02:00
Samuel Štancl
55478c4eb7
Metadata ( #8 )
...
* Metadata
* Fix code style (php-cs-fixer)
* Code style
Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
2022-03-29 20:11:06 +02: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
Samuel Levy
0c87357a6e
Extend functionality to work with pure enums ( #6 )
...
* Extend functionality to work with pure enums
* Code review changes
Altered `::values()` to act like `::names()` for backed enums, code style fixes, general cleanups
2022-03-23 21:42:35 +01:00
Samuel Štancl
20fa78c2b1
Update README.md
2022-02-21 21:35:46 +01:00
Eric Junker
54bedefb79
use array_column() to get the names, values, and options ( #3 )
2022-02-21 13:32:07 +01:00
Samuel Štancl
c733871aaa
Update README.md
2022-02-21 01:44:47 +01:00
Samuel Štancl
9594edb630
Merge branch 'master' of github.com:archtechx/enums
2022-02-20 21:59:43 +01:00
Samuel Štancl
1fbdbfb914
document names() options() values()
2022-02-20 21:59:36 +01:00
PHP CS Fixer
dbf07102e9
Fix code style (php-cs-fixer)
2022-02-20 20:54:24 +00:00
Samuel Štancl
e65131079c
Merge branch 'master' of github.com:archtechx/enums
2022-02-20 21:53:51 +01:00
Samuel Štancl
b50d001374
add names() and values() methods, resolve #1
2022-02-20 21:53:21 +01:00
PHP CS Fixer
17d3a21188
Fix code style (php-cs-fixer)
2022-02-20 20:51:14 +00:00
Samuel Štancl
e01edd128f
add options() method, resolve #2
2022-02-20 21:50:53 +01:00
Samuel Štancl
7c02bbaa73
remove docker call
2022-02-20 21:16:03 +01:00
Samuel Štancl
5293b3bb9f
wip
2022-02-20 21:10:21 +01:00
Samuel Štancl
055250b9a7
wip
2022-02-20 21:08:00 +01:00
Samuel Štancl
e045c334bc
wip
2022-02-20 21:04:01 +01:00
Samuel Štancl
0562f21e68
wip
2022-02-20 21:02:38 +01:00
Samuel Štancl
ca27cbfdf5
wip
2022-02-20 21:02:02 +01:00
Samuel Štancl
41b423da38
initial
2022-02-20 20:58:57 +01:00
f9fe9e5cab
Initial commit
2022-02-20 19:51:56 +01:00