You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the following example Docblock-defined type 0|int<1, 16> for $length is never int(1) the length can be between 0 and 15 which makes 1 a valid possibility. Psalm started to complain about it in the recent version.
Psalm output (using commit aa7e400):
ERROR: DocblockTypeContradiction - 9:1 - Docblock-defined type 0|int<1, 16> for $length is never int(1)
ERROR: RedundantConditionGivenDocblockType - 9:26 - Docblock-defined type 0|int<1, 16> for $length is never int(1)
ERROR: UnusedFunctionCall - 9:26 - The call to substr is not used
I fixed only one side of the issue in #7224. The other side is technically a duplicate of #6871 but this is very not obvious so I'll keep that one open too.
As I said there: the other side, while easily fixed causes other false positives that I just don't know how to fix yet.
In the following example Docblock-defined type 0|int<1, 16> for $length is never int(1) the length can be between 0 and 15 which makes 1 a valid possibility. Psalm started to complain about it in the recent version.
Docblock-defined type 0|int<1, 16> for $length is never int(1)
The text was updated successfully, but these errors were encountered: