voku/phpstan-rules
Additional PHPStan rules to catch risky and redundant condition logic and comparisons. Detects double negatives, PHP 8 behavior changes (0 vs ''), insane/invalid comparisons (0=='0foo', 0==='0'), and type-mismatch checks (e.g., object vs non-object).
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| thecodingmachine/phpstan-safe-rule | 0.94 | PHPStan rule set that flags calls to “unsafe” PHP functions that can return false on failure and suggests using the thecodingmachine/safe equivalents that throw exceptions, helping enforce safer, exception-based error handling in your codebase. | 62 | 62 | 25 | 227K | 3 | 15.8 | 53.4 | — | 6 months ago | |
| localheinz/phpstan-rules | 0.92 | Custom PHPStan rules to enforce stricter coding standards in PHP projects. Includes ready-to-use rules.neon (auto-loaded via phpstan/extension-installer) with checks like no named arguments, class final enforcement, and more. Install via Composer as a dev dependency. | 453 | 451 | 24 | 783 | 6 | 27.6 | 10.2 | MIT | 4 months ago | |
| ergebnis/phpstan-rules | 0.90 | A set of extra PHPStan rules to enforce stricter, opinionated code standards in PHP projects. Install via Composer and include rules.neon (auto via phpstan/extension-installer) to catch issues like named arguments, class design, and more. | 453 | 454 | 24 | 253K | 6 | 27.3 | 45.9 | MIT | 4 months ago | |
| symplify/phpstan-rules | 0.89 | Extra PHPStan rules by Symplify to catch bugs, improve code quality, and enforce consistent conventions. Easy to install and configure, with a broad set of checks for Symfony/Laravel and modern PHP features to keep your codebase clean. | 266 | 265 | 31 | 504K | 0 | 3.5 | 45.3 | MIT | 1 year ago | |
| sanmai/phpstan-rules | 0.89 | Extra PHPStan rules from sanmai that extend static analysis for PHP projects. Helps catch additional issues not covered by core rules, improving code quality and consistency with minimal setup. | 3 | 4 | 0 | 2K | 0 | 19.3 | 41.9 | Apache-2.0 | 3 months ago | |
| pepakriz/phpstan-exception-rules | 0.88 | PHPStan extension that adds custom rules for analyzing exceptions. It helps catch improper throwing/catching, missing @throws annotations, and other exception-related issues to improve correctness and maintainability in PHP codebases. | 109 | 111 | 10 | 7K | 8 | 12.1 | 27.1 | — | 4 years ago | |
| thecodingmachine/phpstan-strict-rules | 0.88 | Extra-strict PHPStan ruleset that flags risky or inconsistent PHP patterns beyond the default checks. Helps enforce cleaner, safer code by catching edge cases and enforcing best practices, with easy opt-in configuration for existing PHPStan setups. | 290 | 290 | 27 | 58K | 9 | 14.1 | 35.2 | — | 4 years ago | |
| sidz/phpstan-rules | 0.88 | Custom PHPStan rules aimed at Laravel projects, helping catch common mistakes and enforce best practices. Adds extra static analysis checks tailored to typical framework patterns, improving code quality, consistency, and confidence during refactors. | 31 | 31 | 4 | 42K | 0 | 7.6 | 44.1 | MIT | 10 months ago | |
| phpstan/phpstan-strict-rules | 0.85 | Opinionated extra rules for PHPStan to enforce strict, strongly typed PHP. Catches loose booleans in conditions, unsafe strict parameters, useless casts, non-numeric arithmetic, variable overwrites in loops, and switch/case type mismatches for safer defensive code. | 697 | 707 | 61 | 3M | 39 | 45.4 | 73.6 | MIT | 1 month ago | |
| kcs/phpstan-strict-rules | 0.84 | Fork of thecodingmachine/phpstan-strict-rules to support PHPStan v2. Adds stricter best-practice rules beyond core PHPStan, especially around exception handling (avoid throwing base Exception, empty catches, proper rethrowing). | 3 | 3 | 0 | 4K | 0 | 0.0 | 41.6 | — | — |
How can I help you explore Laravel packages today?