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
{{ message }}
This repository has been archived by the owner on Oct 1, 2023. It is now read-only.
The French have a concept of strictly positive and strictly negative, which match the common English definition, which excludes zero. Interesting to note, the docblock of the class itself does not acknowledge zero, since May be positive or negative seems to suggest that zero is not an option.
/**
* Represents a time interval (a specific number of hours, minutes, seconds, and
* nanoseconds). May be positive or negative. All instances are immutable.
May I suggest adding ->isPositiveOrZero() and ->isNegativeOrZero(). Not because ->isPositive() || ->isZero() or !->isNegative() is to hard to write, but as a reminder to programmers who navigate autocomplete to think about what to do with zero. This small reminder might make a large difference.
I believe this might be a language thing. I do not know if this is confusing to others. This might be very be a European thing.
The French have a concept of strictly positive and strictly negative, which match the common English definition, which excludes zero. Interesting to note, the docblock of the class itself does not acknowledge zero, since
May be positive or negative
seems to suggest that zero is not an option.May I suggest adding
->isPositiveOrZero()
and->isNegativeOrZero()
. Not because->isPositive() || ->isZero()
or!->isNegative()
is to hard to write, but as a reminder to programmers who navigate autocomplete to think about what to do with zero. This small reminder might make a large difference.The text was updated successfully, but these errors were encountered: