Closed paragonie-scott closed 6 years ago
Relatedly, this curious chunk of code was flagged by latest Psalm dev-master
.
Oh, I should probably change null
to []
? (Composer still hasn't updated.)
more the if (!\is_array($data)) {
check on something that is definitely an array (because of the cast)
Is there any chance we can just make the is_*()
functions excluded from type errors?
They should be excluded when the type comes from a docblock (as opposed to language-level check). I think the difference here is that the if
is inside a loop, and I imagine I introduced a regression with https://github.com/vimeo/psalm/pull/115. Will fix momentarily.
But still, how can that if statement ever be true?
It can't ever be true; it's dead code. I'm removing it in a few seconds. :)
Left to do before this can be closed (mostly meant as a note to myself so the next time I look through open issues for things to work on, I don't need to try to refresh my own memory):
You can do psalm --config=somefile.xml
Perfect! Thanks. :)
If you're running --diff
builds locally you'll need to specify different cache directories for them, but I think your codebase is small enough that --diff
builds aren't necessary.
We currently have Psalm running in Travis CI on the core files (src/Engine). We should expand the coverage include everything in
src
. We'll have to do each Cabin individually.