dave-liddament/phpstan-php-language-extensions
A PHPStan extension that adds support for extra PHP language features and type declarations, widening static analysis coverage so PHPStan understands more of your code. Helps catch bugs earlier and reduces false positives in Laravel and PHP projects.
phpstan-php-language-extensions brings support for PHPDoc annotations that extend the PHP language, letting PHPStan understand semantics it cannot infer on its own. Annotate classes and functions to get stricter static analysis and richer type information—no runtime changes required.
@ReadOnly — marks a class whose state must not change after construction; PHPStan reports methods that mutate it.@NeverReturn — tells PHPStan a function or method never returns, improving control-flow and unreachable-code analysis.@CheckType — declares that a function asserts an argument's type, enabling type narrowing after the call.@Pure — marks a function or method as side-effect free for safer analysis.How can I help you explore Laravel packages today?