pmarki / phpstan-rules
Set of additional PHPStan rules
Package info
github.com/pmarki/phpstan-rules
Type:phpstan-extension
pkg:composer/pmarki/phpstan-rules
dev-main
2025-04-25 13:36 UTC
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: 2026-03-25 15:33:18 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