muqsit / generator-phpstan-rules
PHPStan rules bringing added Generator inspections
Installs: 18
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:phpstan-extension
Requires
- php: ^8.1
- phpstan/phpstan: ^1.10
Requires (Dev)
- nikic/php-parser: ^4.13.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-10-20 01:38:54 UTC
README
PHPStan rules bringing added Generator inspections, primarily targeting 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 aGenerator
parameter, etc.) (finds unused generators).
Installation
This library is compatible with PHPStan's extension installer. Install it by running:
composer require --dev phpstan/extension-installer && \
composer require --dev muqsit/generator-phpstan-rules