Static analysis for ANTLR4 PHP Runtime.
This extension provides correct return type for context's sub-rule getters.
Using Composer:
composer require --dev antlr/antlr-php-runtime-phpstan
If you also install phpstan/extension-installer then you're all set!
Manual installation
If you don't want to use phpstan/extension-installer
, include extension.neon in your project's PHPStan config:
includes:
- vendor/antlr/antlr-php-runtime-phpstan/extension.neon
To run all unit tests, use the locally installed PHPUnit:
./vendor/bin/phpunit