odan/phpstan-rules

PHPStan rules

Installs: 1 397

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 2

Forks: 0

Open Issues: 0

Type:phpstan-extension

0.1.0 2023-01-15 19:29 UTC

This package is auto-updated.

Last update: 2024-11-06 16:37:20 UTC


README

A collection of PHPStan rules.

Requirements

  • PHP 8

Installation

composer require odan/phpstan-rules --dev

To use the PHPStan rules, you need to include the classes in your PHPStan configuration file phpstan.neon.

Just pick the rules you want:

rules:
	- Odan\PHPStan\Rules\AssignmentInConditionRule
	- Odan\PHPStan\Rules\YodaConditionRule

If you want to include all rules, you have to include rules.neon in your project's PHPStan config:

includes:
	- vendor/odan/phpstan-rules/rules.neon

Rules

  • AssignmentInConditionRule
  • YodaConditionRule

License

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