antlr / antlr-php-runtime-phpstan
ANTLR4 PHP 运行时扩展用于 PHPStan。
0.3.0
2021-11-20 16:02 UTC
Requires
- php: ^7.2 || ^8.0
- phpstan/phpstan: ^1.2
Requires (Dev)
- antlr/antlr4-php-runtime: ^0.5
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
- slevomat/coding-standard: ^7.0
- squizlabs/php_codesniffer: ^3.6
This package is auto-updated.
Last update: 2024-09-20 22:08:00 UTC
README
对 ANTLR4 PHP 运行时 进行静态分析。
特性
此扩展为上下文子规则获取器提供正确的返回类型。
安装
使用 Composer
composer require --dev antlr/antlr-php-runtime-phpstan
注册插件
如果你还安装了 phpstan/extension-installer,那么你已经设置好了!
手动安装
如果你不想使用 phpstan/extension-installer
,请将 extension.neon 包含在你的项目 PHPStan 配置中
includes: - vendor/antlr/antlr-php-runtime-phpstan/extension.neon
测试
要运行所有单元测试,请使用本地安装的 PHPUnit
./vendor/bin/phpunit