teabugger / enum
PHP ENUM implementation
v1.0
2020-09-27 08:41 UTC
Requires
- php: ^7.4
Requires (Dev)
- phpstan/phpstan: ^0.12.45
- phpunit/phpunit: >=8.0
- squizlabs/php_codesniffer: >=3.5.6
This package is auto-updated.
Last update: 2024-10-27 18:37:16 UTC
README
Install
Via Composer
$ composer require teabugger/enum
Usage
use Teabugger/Enum; class MyEnum extends Enum { public const FOO = 'foo'; public const BAR = 'bar'; } $foo = new MyEnum(MyEnum::FOO); // (string) $foo === 'foo';
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email kolesnik.teabugger@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.