guanguans/phpstan-rules

A set of additional rules for phpstan/phpstan. - 一套针对 `phpstan/phpstan` 的附加规则。

Fund package maintenance!
Sponsors

Installs: 479

Dependents: 5

Suggesters: 0

Security: 0

Stars: 1

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/guanguans/phpstan-rules

1.0.2 2026-01-19 05:31 UTC

This package is auto-updated.

Last update: 2026-01-19 07:08:56 UTC


README

Note

A set of additional rules for phpstan/phpstan. - 一套针对 phpstan/phpstan 的附加规则。

tests php-cs-fixer codecov Latest Stable Version GitHub release (with filter) Total Downloads License

Requirement

  • PHP >= 7.4

Installation

composer require guanguans/phpstan-rules --dev --ansi -v

If you also install phpstan/extension-installer then you're all set!

Manual installation

If you don't want to use phpstan/extension-installer, include rules.neon in your project's PHPStan config:

includes:
    - vendor/guanguans/phpstan-rules/config/rules.neon

Usage

Parameter configuration refer to the parameter section the configuration file [config/rules.neon].

You can also refer to the configuration file [tests/Rule/.../.../config/configured_rule.neon] in the tests directory.

Composer scripts

composer checks:required
composer php-cs-fixer:fix
composer phpstan-rules:fix-neon-files
composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.