We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
First of all, apologise for creating an issue as this is rather a question.
Is there a way to predefine / set default currency ?
I'm dealing only with a single currency and having to call Money::of() with currency parameter isn't needed in my situation.
Money::of()
Since class is final, I cannot obviously extend from it and I don't see any other option than set currency every time.
I believe that Money being currency agnostic might also be helpful for some people.
Money
Any advice would be greatly appreciated.
Thanks
The text was updated successfully, but these errors were encountered:
What about a custom "static decoration"? Something like this:
final class DefaultMoney { public static function of( BigNumber|int|float|string $amount, ?Context $context = null, RoundingMode $roundingMode = RoundingMode::UNNECESSARY, ): Money { return BrickMoney::of($amount, 'GBP', $context, $roundingMode); } }
Sorry, something went wrong.
No branches or pull requests
Hi,
First of all, apologise for creating an issue as this is rather a question.
Is there a way to predefine / set default currency ?
I'm dealing only with a single currency and having to call
Money::of()
with currency parameter isn't needed in my situation.Since class is final, I cannot obviously extend from it and I don't see any other option than set currency every time.
I believe that
Money
being currency agnostic might also be helpful for some people.Any advice would be greatly appreciated.
Thanks
The text was updated successfully, but these errors were encountered: