/phpstan-rules

Custom PHPStan Rules (for https://github.com/phpstan/phpstan)

Primary LanguagePHPMIT LicenseMIT

Custom PHPStan Rules

Build Status Coverage Status Latest Stable Version License

This repository provides following custom rules for PHPStan:

  • Check that the __construct() is the first method in the class.
  • If the __construct contains Doctrine\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