Conversation
Adds generic array annotations and return types throughout src/ and tests/ to satisfy level 6, then hardens a handful of unchecked `string|false` / `resource|false` call sites for level 7. Behaviour is unchanged on the happy path; the only runtime-visible changes are in previously-broken error paths (e.g. opendir() returning false, getHeader() on array-valued headers). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
k6 benchmark
|
Greptile SummaryThis PR bumps PHPStan from level 5 to level 7 across Confidence Score: 5/5Safe to merge — changes are confined to type annotations and previously-broken error paths with no impact on the happy path. All findings are P2 or below. The annotation-only changes are mechanical and consistent. The two behavioral fixes (opendir throw, FPM header join) are improvements over the prior broken behavior and are documented in the PR description. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "Chore: Bump PHPStan to level 7" | Re-trigger Greptile |
Summary
array<K, V>) and missing return types acrosssrc/andtests/to clear level 6.string|false/resource|falsecall sites (file_get_contents,json_encode,ob_get_contents,opendir, SwoolerawContent) for level 7.phpstan.neonfrom level 5 → 7.Behaviour
No change on the happy path. The only runtime-visible changes are in previously-broken error paths:
opendir()failure now throws instead of passingfalseintoreaddir(); FPMgetHeader()joins array-valued headers with,instead of returning an array despite a: stringreturn type.Test plan
vendor/bin/phpstan analyse— clean at level 7vendor/bin/pint --test— passes🤖 Generated with Claude Code