https://github.com/muqsit/generator-phpstan-rules
PHPStan rules bringing added Generator inspections.
https://github.com/muqsit/generator-phpstan-rules
phpstan phpstan-extension phpstan-rules static-analysis static-code-analysis strongly-typed
Last synced: about 2 months ago
JSON representation
PHPStan rules bringing added Generator inspections.
- Host: GitHub
- URL: https://github.com/muqsit/generator-phpstan-rules
- Owner: Muqsit
- License: mit
- Created: 2024-04-16T20:42:31.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-30T02:30:11.000Z (5 months ago)
- Last Synced: 2025-03-29T11:05:12.897Z (3 months ago)
- Topics: phpstan, phpstan-extension, phpstan-rules, static-analysis, static-code-analysis, strongly-typed
- Language: PHP
- Homepage:
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# generator-phpstan-rules
PHPStan rules bringing added Generator inspections, primarily targeting [SOF3/await-generator](https://github.com/SOF3/await-generator) projects.
This extension introduces the following checks:
- Require generators be consumed (by a `foreach`, `yield from $g`, `...$g`, a function that accepts a `Generator` parameter, etc.) (finds unused generators).### Installation
This library is compatible with PHPStan's extension installer. Install it by running:
```sh
composer require --dev phpstan/extension-installer && \
composer require --dev muqsit/generator-phpstan-rules
```