mhujer/phpstan-rules

Custom rules for phpstan

Installs: 25 611

Dependents: 1

Suggesters: 0

Security: 0

Stars: 6

Watchers: 2

Forks: 0

Open Issues: 0

pkg:composer/mhujer/phpstan-rules

1.0 2021-11-05 12:46 UTC

This package is auto-updated.

Last update: 2025-10-05 21:36:33 UTC


README

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