nextgen-tech / phpstan-laravel-rules
v1.0.0
2020-10-14 13:11 UTC
Requires
- php: ^7.1|^8.0
- phpstan/phpstan: ^0.11|^0.12
README
This package provides collection of PHPStan rules for Laravel applications. For now it provides 2 new rules:
- disallow debug functions (
dd
,ddd
,dump
,debug
,print_r
,var_dump
andvar_export
) - disallow debug methods on Collections (
dd
,dump
anddebug
)
Installation
composer require nextgen-tech/phpstan-laravel-rules --dev
Including extension to PHPStan
In phpstan.neon
or phpstan.neon.dist
file in includes
section add:
./vendor/nextgen-tech/phpstan-laravel-rules/extension.neon
After that file should looks like this:
includes: - ./vendor/nunomaduro/larastan/extension.neon # larastan extension, could be omited - ./vendor/nextgen-tech/phpstan-laravel-rules/extension.neon # extension from this package parameters: paths: - app level: 8