mhujer/phpstan-rules

为phpstan定制的规则

1.0 2021-11-05 12:46 UTC

This package is auto-updated.

Last update: 2024-09-05 19:14:47 UTC


README

Build Status Coverage Status Latest Stable Version License

此仓库为PHPStan提供以下自定义规则:

  • 检查类中第一个方法是__construct()
  • 如果__construct参数中包含Doctrine\ORM\EntityManagerInterface,则它必须是最后一个。

使用方法

要使用这些规则,请在Composer中引入它们

composer require --dev mhujer/phpstan-rules

并将它们包含到您项目的PHPStan配置中

includes:
    - vendor/mhujer/phpstan-rules/rules.neon