-
-
Notifications
You must be signed in to change notification settings - Fork 102
Fix Money::allocateWithRemainder() #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d914788
to
75bc1e3
Compare
@artfulrobot @NCatalani would you mind reviewing this? Do you think we should change the implementation of allocate() as well? |
just a FYI, i ran this testcase through moneyphp/money |
Thank you @bendavies, I don't think returning 2 & 1 cents makes any sense, and I do believe now that the behaviour described by @artfulrobot, implemented here, is the correct one. I'm not sure what to do with IMO, |
yes, i agree - i was just highlighting the difference.
well, |
Sure, but I'd be curious what @martinfowler thinks today, I guess the algorithm he presented in his PoEAA book was just an example of what was possible, but I'm not sure which real-life application it has or if it was actually useful to someone as is. Moving forward, I'll merge the |
Fixes #55