-
Notifications
You must be signed in to change notification settings - Fork 9.4k
[FIX] several fixes for sales and tax module: not used imports, variables and legacy code #14106
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
[FIX] several fixes for sales and tax module: not used imports, variables and legacy code #14106
Conversation
| { | ||
| return false; | ||
| $canVoid = false; | ||
| if ($this->getState() == self::STATE_REFUNDED) { |
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.
It would be really nice to analyze from git history when this was hardcoded to return false, maybe a part of functionality is broken now.
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.
@orlangur

As I can see this was from the very beginning.
| * Check order grand total and invoice amounts | ||
| */ | ||
| if ($invoice->isLast()) { | ||
| // |
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.
Same concern as https://github.com/magento/magento2/pull/14106/files#r174779579 - prior to removal we should understand the intention of code author.
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.
@orlangur

As I can see this code was added to the repo with the first push :)
| use Magento\Framework\Exception\NoSuchEntityException; | ||
| use Magento\Tax\Api\Data\OrderTaxDetailsAppliedTaxInterfaceFactory as TaxDetailsDataObjectFactory; | ||
| use Magento\Tax\Api\Data\OrderTaxDetailsAppliedTaxInterface as AppliedTax; | ||
| use Magento\Tax\Model\Sales\Order\Tax; |
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.
Please avoid removal of unused imports, someday we will remove them all at once with php-cs-fixer. Just uncheck this inspection in PhpStorm for now or whatever tool you use for code analysis.
…ports, variables and legacy code #14106
Description
Hello,
In this PR I fixed several not used class imports, remove legacy code and not used variables.
Fixed Issues (if relevant)
N/A
Manual testing scenarios
N/A
Contribution checklist