But ever since, I've been quietly noticing "Psalm errors," where the phpdoc doesn't match types in practice, or doesn't match the actual type declarations on the method.
(Of course, my API design has been strongly affected by PHP type declaration syntax; I am now trying to design "less convenient" interfaces that offer stronger type information for the IDE. I can't declare
string|array|false
in PHP, but I can declare ?array
for an array or null. This just happens to align with reducing the amount of options Psalm has to deal with.)
No comments:
Post a Comment