Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/
namespace Magento\Sales\Block\Adminhtml\Order\Create\Form;

use Magento\Framework\Convert\ConvertArray;
use Magento\Framework\Pricing\PriceCurrencyInterface;

/**
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Sales/Block/Adminhtml/Order/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ protected function _construct()
'class' => __('unhold'),
'id' => 'order-view-unhold-button',
'data_attribute' => [
'url' => $this->getUnHoldUrl()
'url' => $this->getUnholdUrl()
]
]
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ class Order extends \Magento\Sales\Block\Adminhtml\Report\Filter\Form
protected function _prepareForm()
{
parent::_prepareForm();
$form = $this->getForm();
$htmlIdPrefix = $form->getHtmlIdPrefix();
/** @var \Magento\Framework\Data\Form\Element\Fieldset $fieldset */
$fieldset = $this->getForm()->getElement('base_fieldset');

Expand Down
1 change: 0 additions & 1 deletion app/code/Magento/Sales/Helper/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ public function displayPriceAttribute($dataObject, $code, $strong = false, $sepa
*/
public function displayPrices($dataObject, $basePrice, $price, $strong = false, $separator = '<br/>')
{
$order = false;
if ($dataObject instanceof \Magento\Sales\Model\Order) {
$order = $dataObject;
} else {
Expand Down
17 changes: 0 additions & 17 deletions app/code/Magento/Sales/Model/Order/Creditmemo.php
Original file line number Diff line number Diff line change
Expand Up @@ -425,23 +425,6 @@ public function canCancel()
public function canVoid()
{
return false;
$canVoid = false;
if ($this->getState() == self::STATE_REFUNDED) {
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orlangur
image
As I can see this was from the very beginning.

$canVoid = $this->getCanVoidFlag();
/**
* If we not retrieve negative answer from payment yet
*/
if ($canVoid === null) {
$canVoid = $this->getOrder()->getPayment()->canVoid();
if ($canVoid === false) {
$this->setCanVoidFlag(false);
$this->_saveBeforeDestruct = true;
}
} else {
$canVoid = (bool)$canVoid;
}
}
return $canVoid;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
namespace Magento\Sales\Model\Order;

use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
use Magento\Sales\Model\ResourceModel\Order\Creditmemo as Resource;
use Magento\Sales\Model\ResourceModel\Metadata;
use Magento\Sales\Api\Data\CreditmemoSearchResultInterfaceFactory as SearchResultFactory;
use Magento\Framework\Exception\NoSuchEntityException;
Expand Down
9 changes: 3 additions & 6 deletions app/code/Magento/Sales/Model/Order/Invoice/Total/Grand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,14 @@
class Grand extends AbstractTotal
{
/**
* Collect invoice grand total
*
* @param \Magento\Sales\Model\Order\Invoice $invoice
* @return $this
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function collect(\Magento\Sales\Model\Order\Invoice $invoice)
{
/**
* Check order grand total and invoice amounts
*/
if ($invoice->isLast()) {
//
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orlangur
image
As I can see this code was added to the repo with the first push :)

}
return $this;
}
}
1 change: 0 additions & 1 deletion app/code/Magento/Sales/Model/Order/ItemRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Magento\Framework\Exception\InputException;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Sales\Api\Data\OrderItemInterface;
use Magento\Sales\Api\Data\OrderItemSearchResultInterface;
use Magento\Sales\Api\Data\OrderItemSearchResultInterfaceFactory;
use Magento\Sales\Api\OrderItemRepositoryInterface;
use Magento\Sales\Model\ResourceModel\Metadata;
Expand Down
1 change: 0 additions & 1 deletion app/code/Magento/Sales/Model/Order/OrderValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
namespace Magento\Sales\Model\Order;

use Magento\Sales\Api\Data\OrderInterface;
use Magento\Sales\Exception\DocumentValidationException;

/**
* Class OrderValidator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ protected function _construct()
/**
* Returns connection
*
* @todo: make method protected
* @return AdapterInterface
*/
public function getConnection()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/
namespace Magento\Sales\Ui\Component\Listing\Column;

use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Ui\Component\Listing\Columns\Column;
use Magento\Framework\View\Element\UiComponent\ContextInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

<section class="admin__page-section">
<div class="admin__page-section-title">
<span class="title""><?= /* @escapeNotVerified */ __('Child Transactions') ?></span>
<span class="title"><?= /* @escapeNotVerified */ __('Child Transactions') ?></span>
</div>
<div class="admin__page-section-content log-details-grid">
<?= $block->getChildHtml('child_grid') ?>
Expand Down
2 changes: 0 additions & 2 deletions app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Add.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
*/
namespace Magento\Tax\Block\Adminhtml\Rate\Toolbar;

use Magento\Framework\View\Element\Template;

/**
* @api
* @since 100.0.2
Expand Down
1 change: 0 additions & 1 deletion app/code/Magento/Tax/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Magento\Store\Model\Store;
use Magento\Customer\Model\Address;
use Magento\Tax\Model\Config;
use Magento\Customer\Model\Session as CustomerSession;
use Magento\Tax\Api\OrderTaxManagementInterface;
use Magento\Sales\Model\Order\Invoice;
use Magento\Sales\Model\Order\Creditmemo;
Expand Down
1 change: 0 additions & 1 deletion app/code/Magento/Tax/Model/Calculation/Rule/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

namespace Magento\Tax\Model\Calculation\Rule;

use Magento\Framework\Exception\InputException;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Tax\Model\ClassModel as TaxClassModel;
use Magento\Tax\Model\ClassModelRegistry;
Expand Down
1 change: 0 additions & 1 deletion app/code/Magento/Tax/Model/Sales/Order/TaxManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
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;
Copy link
Contributor

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.

use Magento\Sales\Model\Order\Tax\Item;

class TaxManagement implements \Magento\Tax\Api\OrderTaxManagementInterface
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Tax/Model/TaxRuleCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ class TaxRuleCollection extends AbstractServiceCollection
/**
* Initialize dependencies.
*
* @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
* @param EntityFactory $entityFactory
* @param FilterBuilder $filterBuilder
* @param SearchCriteriaBuilder $searchCriteriaBuilder
* @param SortOrderBuilder $sortOrderBuilder
* @param TaxRuleRepositoryInterface $ruleService
*/
public function __construct(
\Magento\Framework\Data\Collection\EntityFactory $entityFactory,
EntityFactory $entityFactory,
FilterBuilder $filterBuilder,
SearchCriteriaBuilder $searchCriteriaBuilder,
SortOrderBuilder $sortOrderBuilder,
Expand Down