https://github.com/antlr/antlr-php-runtime-phpstan
Static analysis for ANTLR4 PHP Runtime.
https://github.com/antlr/antlr-php-runtime-phpstan
antlr4 php7 phpstan
Last synced: about 2 months ago
JSON representation
Static analysis for ANTLR4 PHP Runtime.
- Host: GitHub
- URL: https://github.com/antlr/antlr-php-runtime-phpstan
- Owner: antlr
- License: other
- Created: 2019-11-15T18:26:22.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-11-20T16:03:48.000Z (over 3 years ago)
- Last Synced: 2024-04-26T01:02:34.727Z (about 1 year ago)
- Topics: antlr4, php7, phpstan
- Language: PHP
- Homepage:
- Size: 41 KB
- Stars: 6
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ANTLR4 Extension for PHPStan
[](https://travis-ci.org/antlr/antlr-php-runtime-phpstan)
[](https://packagist.org/packages/antlr/antlr-php-runtime-phpstan)
[](https://packagist.org/packages/antlr/antlr-php-runtime-phpstan)Static analysis for [ANTLR4 PHP Runtime](https://github.com/antlr/antlr-php-runtime).
## Features
This extension provides correct return type for context's sub-rule getters.
## Install
Using Composer:
```sh
composer require --dev antlr/antlr-php-runtime-phpstan
```## Register Plugin
If you also install [phpstan/extension-installer](https://github.com/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:
```yaml
includes:
- vendor/antlr/antlr-php-runtime-phpstan/extension.neon
```## Testing
To run all unit tests, use the locally installed PHPUnit:```sh
./vendor/bin/phpunit
```