Closed jasonmm closed 3 years ago
I am currently adding psalm support (see #208). Since you seem to be using psalm and in case you are interested, feel free to check the psalm
branch and report any issue you might encounter.
I’ll leave this PR open for the time being to not create conflicts with the psalm work.
@lstrojny, would it be helpful if I were to make this pull request against the psalm
branch?
@jasonmm sure, that would be awesome. In this case though, minimum
and maximum
are correct in psalm
already.
This pull request is no longer applicable.
The
minimum
andmaximum
functions can return null if the $collection is empty. This commit adds to their @return annotation that a null return is a possibility.I'm not sure if this relates to #208, but psalm does report handling the possibility of a null return with
DocblockTypeContradiction
.For example,
maximum([]) ?? -1
will produce aDocblockTypeContradiction
.