odan / phpstan-rules
PHPStan 规则
0.1.0
2023-01-15 19:29 UTC
Requires
- php: ~8.0 || ~8.1 || ~8.2
- phpstan/phpstan: 1.*
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3
- nikic/php-parser: ^4.13.0
- php-parallel-lint/php-parallel-lint: ^1.2
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3
This package is auto-updated.
Last update: 2024-09-06 16:17:50 UTC
README
PHPStan 规则集合。
要求
- PHP 8
安装
composer require odan/phpstan-rules --dev
要使用 PHPStan 规则,您需要将类包含在您的 PHPStan 配置文件 phpstan.neon
中。
仅选择您需要的规则
rules: - Odan\PHPStan\Rules\AssignmentInConditionRule - Odan\PHPStan\Rules\YodaConditionRule
如果您想包含所有规则,必须在您的项目 PHPStan 配置中包含 rules.neon
文件。
includes: - vendor/odan/phpstan-rules/rules.neon
规则
- AssignmentInConditionRule
- YodaConditionRule
许可协议
MIT 许可协议 (MIT)。有关更多信息,请参阅许可文件。