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

v1.0.3 2024-04-20 00:17 UTC

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 a Generator 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