tomasvotruba/unused-public
PHPStan extension that finds unused public methods, properties, and constants by scanning calls across your codebase. Helps clean up dead APIs or spot members that should be private/protected. Supports gradual adoption via allowed % thresholds and excluding template-used methods.
For executives: "This tool proactively identifies and removes unused public code elements, reducing technical debt by up to 30% in large codebases. This translates to faster feature delivery, lower bug rates, and reduced maintenance costs—freeing engineering resources for high-value work. By integrating into CI pipelines, it ensures ongoing code quality without slowing releases, directly supporting our goals of scalable, secure, and efficient product development."
For engineering: "Easy to integrate with PHPStan and Laravel via minimal config—exclude template paths and use @api annotations to avoid false positives. Run in CI to block regressions, with thresholds to manage tolerable unused percentages. Complements existing static analysis by focusing specifically on public API cleanup, which is critical for maintaining a clean, secure codebase. Start with a small scope (e.g., services layer), then expand as confidence grows."
How can I help you explore Laravel packages today?