mhujer / phpstan-consistence
Custom PHPStan Rules for Consistence library
1.0
2021-11-05 12:17 UTC
Requires
- php: ~8.0 || ~8.1
- consistence-community/consistence: ^2.1.1
- phpstan/phpstan: ^1.0
Requires (Dev)
- consistence-community/coding-standard: 3.11.1
- php-parallel-lint/php-parallel-lint: 1.3.1
- phpunit/phpunit: 9.5.10
README
This repository provides following custom PHPStan rules for Consistence library
- Check that no class extends
\Consistence\ObjectPrototype
or uses\Consistence\Type\ObjectMixinTrait
somewhere in its hierarchy tree. The type of errors it prevents is caught by PHPStan so there is no need to extend/use anymore. - Check that Consistence function wrappers (from
ArrayType
) are used for array manipulation
Usage
To use those rules, require them in Composer:
composer require --dev mhujer/phpstan-consistence
And include them in your project's PHPStan config:
includes: - vendor/mhujer/phpstan-consistence/rules.neon