-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Product Variant] Price Calculator fixed to return always int #12549
Conversation
Sure 👍🏻 |
0ba83a0
to
bc88a22
Compare
@lruozzi9 Great! Thank you! |
bc88a22
to
e610135
Compare
I agree, it is more readable! I will change it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like you to make a few more changes if you don't mind.
I promise it's the last one from me.
src/Sylius/Component/Core/Calculator/ProductVariantPriceCalculator.php
Outdated
Show resolved
Hide resolved
src/Sylius/Component/Core/Calculator/ProductVariantPriceCalculator.php
Outdated
Show resolved
Hide resolved
src/Sylius/Component/Core/Calculator/ProductVariantPriceCalculator.php
Outdated
Show resolved
Hide resolved
src/Sylius/Component/Core/Calculator/ProductVariantPriceCalculator.php
Outdated
Show resolved
Hide resolved
src/Sylius/Component/Core/Calculator/ProductVariantPriceCalculator.php
Outdated
Show resolved
Hide resolved
Hey @vvasiloi! Sorry, I was a little busy these days! I will check your comments! |
3a1f687
to
7a912fd
Compare
src/Sylius/Component/Core/Calculator/ProductVariantPriceCalculator.php
Outdated
Show resolved
Hide resolved
src/Sylius/Component/Core/Calculator/ProductVariantPriceCalculator.php
Outdated
Show resolved
Hide resolved
src/Sylius/Component/Core/Calculator/ProductVariantPriceCalculator.php
Outdated
Show resolved
Hide resolved
src/Sylius/Component/Core/Exception/MissingChannelConfigurationException.php
Outdated
Show resolved
Hide resolved
src/Sylius/Component/Core/Exception/MissingChannelConfigurationException.php
Outdated
Show resolved
Hide resolved
089788f
to
a037a50
Compare
I have a doubt about the location of the factory exception folder. Perhaps it is more correct to create a Factory folder inside Exception? Or an Exception folder inside Factory? |
There's really no right or wrong here, it's all a matter of opinion, especially because there's no precedent for it in Sylius' codebase. |
On the other hand, we only have one case and I don't it changing anytime soon, so maybe it's better to just put the factory method inside the exception class. |
a037a50
to
0fdea57
Compare
@lruozzi9 I just noticed that you target branch 1.8 🤦♂️. Can you rebase your branch and change the target to 1.10? |
0fdea57
to
b7565e4
Compare
Thanks, Lorenzo! 🎉 |
This Pull Request will avoid returning null on int only return type allowed function. If getPrice is null for the channel the same exception is thrown.