Psalm
A static analysis tool for finding errors in PHP applications
...Psalm helps people maintain a wide variety of codebases, large and small, ancient and modern. On its strictest setting it can help you prevent almost all type-related runtime errors, and enables you to take advantage of safe coding patterns popular in other languages. Psalm also fixes bugs automatically, allowing you to improve your code without breaking a sweat. If Psalm cannot infer a type for an expression then it uses a mixed placeholder type. mixed types can sometimes mask bugs, so keeping track of them helps you avoid a number of common pitfalls. Psalm has a Language Server that’s compatible with a range of different IDEs. ...