Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ vendor/bin/phpunit

PHPStan extras enabled in `phpstan.neon`:
- `type-coverage` (ships the former `type-perfect` rules): `no_mixed`, `null_over_false`, `narrow_param`, `narrow_return` — return/param types must be narrow; prefer `null` over `false` for "no result".
- `type_coverage`: at least 99 % of return types, param types, property types, constant types and `declare(strict_types=1)` must be in place.
- `unused-public`: public methods/properties/constants must be used somewhere. If you add a new public API, expect to use it or mark it accordingly.
- `symplify/phpstan-rules` + `rector-rules`: forbids `var_dump`, `dd`, `property_exists`, `class_exists`, `@` error suppression, dynamic names, etc., outside the narrowly listed exceptions in `phpstan.neon`. Do not add new exceptions casually — fix the code.

Expand Down
8 changes: 8 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ parameters:
narrow_param: true
narrow_return: true

# see https://github.com/TomasVotruba/type-coverage
type_coverage:
declare: 99
return_type: 99
param_type: 99
property_type: 99
constant_type: 99

# see https://github.com/TomasVotruba/unused-public
unused_public:
methods: true
Expand Down
Loading