tomasvotruba/phpstan-bodyscan
PHPStan Bodyscan is a PHPStan extension that scans PHP method bodies for issues and surfaces them during static analysis. It helps catch body-level code problems early and fits easily into an existing PHPStan setup.
@phpstan-ignore annotations, turning "our code has a lot of ignores" into a defensible backlog ordering.--json output makes the scan consumable by CI jobs, dashboards, and trend tracking — enabling a suppression-count metric alongside coverage and lint metrics.Consider it when:
@phpstan-ignore annotations) and cannot easily answer "which rules do we suppress most?"--json).Adoption criteria: confirm PHP/PHPStan version compatibility with your pinned toolchain, verify the tool's own analysis remains within your CI runner memory budget on your largest repository, and check that the JSON schema is stable enough to build dashboards on (pin the version until it is).
Look elsewhere when:
grep over ignore comments answers the question.For executives: This is a zero-cost, development-only tool that converts an invisible quality problem — how often we silence static analysis warnings — into a single trackable number. It carries no production risk: it runs in CI or locally, touches no application code, and requires no procurement. The payoff is prioritization: we stop guessing which code-quality work matters and can show measurable improvement over time.
For engineering: One command scans the codebase, reads the PHPStan ignore annotations already in place, and reports counts by identifier. Release 0.2.0 adds --json output, so results can be piped into CI checks or an internal dashboard, and raises the memory limit so full analysis works on large projects. There are no code changes required to adopt it — it's a dev dependency used to build the case for raising PHPStan levels and to keep inline suppressions honest. Recommend pinning the version and trialing it on the largest repository first.
How can I help you explore Laravel packages today?