timeweb/phpstan-enum

PHPStan 的 Enum 类反射扩展

安装量: 2,506,209

依赖者: 19

建议者: 0

安全性: 0

星标: 42

关注者: 7

分支: 7

开放问题: 1

类型:phpstan-extension

v3.1.1 2022-10-17 05:55 UTC

README

Packagist Version GitHub Workflow Status

此扩展为 MyCLabs\Enum\Enum 子类定义动态方法。

使用方法

要使用此扩展,请使用 Composer 进行安装

composer require --dev timeweb/phpstan-enum

如果您还安装了 phpstan/extension-installer,则一切准备就绪!

手动安装

如果您不想使用 phpstan/extension-installer,请将 extension.neon 包含在您项目的 PHPStan 配置中

includes:
  - vendor/timeweb/phpstan-enum/extension.neon

为本地开发安装

使用 docker

git clone git@github.com:timeweb/phpstan-enum.git
cd phpstan-enum
make docker-build
make install
make phpunit

不使用 docker(在本地安装实际的 php、composer 等)

git clone git@github.com:timeweb/phpstan-enum.git
cd phpstan-enum
make install
make phpunit