pmarki / phpstan-rules
Set of additional PHPStan rules
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:phpstan-extension
Requires
- php: ^8.2
- phpstan/phpstan: ^2.0
Requires (Dev)
- phpunit/phpunit: ^10.1 || ^11.0 || ^12.0
- symplify/easy-coding-standard: ^12.5
This package is auto-updated.
Last update: 2025-05-25 13:47:33 UTC
README
Set of additional PHPStan rules
For legacy codebase
- check if property and constant shouldn't be set as protected (when is not inherited or class is not abstract)
- check if property name starts with underscore
- check if constant name is uppercase
PHPMD rules
- check for boolean argument flag
- maximum number of parameters (default 10)
Installation
Run composer require --dev pmarki/phpstan-rules
Edit your phpstan configuration file and add
includes:
- vendor/pmarki/phpstan-rules/extension.neon
Additional configuration:
parameters:
pmarki:
excessiveParameterListRule:
maxNumberOfParameters: 10