mhujer / phpstan-rules
Custom rules for phpstan
Installs: 21 029
Dependents: 1
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ~8.0 || ~8.1
- phpstan/phpstan: ^1.0
Requires (Dev)
- consistence-community/coding-standard: 3.11.1
- php-parallel-lint/php-parallel-lint: 1.3.1
- phpunit/phpunit: 9.5.10
Conflicts
- nikic/php-parser: <4.13.0
This package is auto-updated.
Last update: 2024-11-05 19:32:52 UTC
README
This repository provides following custom rules for PHPStan:
- Check that the
__construct()
is the first method in the class. - If the
__construct
containsDoctrine\ORM\EntityManagerInterface
as a parameter, it must be sorted as the last one.
Usage
To use those rules, require them in Composer:
composer require --dev mhujer/phpstan-rules
And include them in your project's PHPStan config:
includes: - vendor/mhujer/phpstan-rules/rules.neon