Closed joshdifabio closed 4 years ago
Are you suggesting that I relax the type-hinting currently used in isEqualTo()
methods, and replace it with an additional instanceof
check?
I currently can't see the value of this approach: why would I ever compare a LocalDate with a LocalTime, for example?
I'm closing this issue due to lack of feedback.
As mentioned above, most classes implement an isEqualTo()
method, that compares to objects of the same type. I currently don't see a value in comparing to objects of other types, if that's what the issue is about.
Please feel free to comment if you wish to reopen the discussion.
An equals($value) method on all value classes (no type declaration on the parameter) would make this library much easier to work with in combination with other libraries which deal with generic value types, e.g. https://github.com/Space48/auto-value-php.