Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 1 month 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 (9 months ago)
- Default Branch: master
- Last Pushed: 2024-04-20T00:34:17.000Z (9 months ago)
- Last Synced: 2024-11-27T18:57:03.491Z (about 2 months ago)
- Topics: phpstan, phpstan-extension, phpstan-rules, static-analysis, static-code-analysis, strongly-typed
- Language: PHP
- Homepage:
- Size: 13.7 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
```