Closed geoffreyvanwyk closed 3 months ago
If I use a factory method (and a private constructory), I might get rid of the $rawValue
property. Then the equality operator ==
should work and the the equals()
will not be necessary.
I got rid of $rawValue
without using a private constructor. I made value()
private and used it for preparing $value
for validation.
The underlying string value can always be gotten with the
strval
function. So, no.Is the
$rawValue
property really necessary?No. Just use value alone.Yes, because it is used in tests when expecting the exception messages.value()
method- [ ] Remove$rawValue
properyThis is a breaking change. The major version number of the release that includes this change should be incremented, in-keeping with semantic versioning.