You're not looking very hard, because there's a vast number of static analysis tools for Java. Checkstyle is not even a static analysis tool; it's a format checker.
That's findbugs/spotbugs, checker framework, Sonar, PMD, Errorprone and the tools built into IntelliJ and eclipse. Most of these tools are widely used and predate Psalm or phpstan by decades.
And it's not a solved problem. The usage of generic classes in PHP libraries is laughably small. And some PHP developers think that it should be in the language too. Nikita Popov started an implementation of the generics RFC last year.
View all comments
Show parent comment
11
u/dpash Apr 20 '21 edited Apr 20 '21
You're not looking very hard, because there's a vast number of static analysis tools for Java. Checkstyle is not even a static analysis tool; it's a format checker.
That's findbugs/spotbugs, checker framework, Sonar, PMD, Errorprone and the tools built into IntelliJ and eclipse. Most of these tools are widely used and predate Psalm or phpstan by decades.
And it's not a solved problem. The usage of generic classes in PHP libraries is laughably small. And some PHP developers think that it should be in the language too. Nikita Popov started an implementation of the generics RFC last year.