A collection of PHPStan rules.
- PHP 8
composer require odan/phpstan-rules --dev
To use the PHPStan rules, you need to include the classes
in your PHPStan configuration file phpstan.neon
.
Just pick the rules you want:
rules:
- Odan\PHPStan\Rules\AssignmentInConditionRule
- Odan\PHPStan\Rules\YodaConditionRule
If you want to include all rules, you have to include rules.neon
in your project's PHPStan config:
includes:
- vendor/odan/phpstan-rules/rules.neon
- AssignmentInConditionRule
- YodaConditionRule
The MIT License (MIT). Please see License File for more information.