rquadling / enumeration
There is no license information available for the latest version (v2.0.0) of this package.
Extension to Eloquent/Enumeration for use within RQuadling's projects.
v2.0.0
2020-06-28 19:31 UTC
Requires
- php: ^7.4
- ext-json: *
- eloquent/enumeration: ^6.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- phpstan/phpstan: ^0.12
- phpstan/phpstan-php-parser: ^0.12
- phpstan/phpstan-phpunit: ^0.12
- phpunit/phpunit: ^9.2
This package is auto-updated.
Last update: 2024-12-06 18:34:54 UTC
README
Extension to Eloquent/Enumeration for use within RQuadling's projects.
Installation
Using Composer:
composer require rquadling/enumeration
PHPStan rules
A PHPStan rule governing the enumeration class is available.
The rules are:
- Attempting to extend
\Eloquent\Enumeration\AbstractEnumeration
rather than\RQuadling\Enumeration\AbstractEnumeration
. - Multiple names exist for the the values in the enumeration.
- Missing
@method static
docblocks.
If you also install phpstan/extension-installer then you're all set!
Manual installation
If you don't want to use phpstan/extension-installer
, include rules.neon
in your project's PHPStan config:
includes:
- vendor/rquadling/enumeration/rules.neon