Skip to content

Commit

Permalink
🔃 [EngCom] Public Pull Requests - 2.2-develop
Browse files Browse the repository at this point in the history
Accepted Public Pull Requests:
 - magento#14136: Added mage/translate component to customers's ajax login (by @ccasciotti)
 - magento#14106: [FIX] several fixes for sales and tax module: not used imports, variables and legacy code (by @coderimus)
 - magento#14041: Removed unnecessary protected member variables. (by @yogeshks)
  • Loading branch information
magento-engcom-team authored Mar 17, 2018
2 parents 06aea05 + 119564c commit ac1e74c
Show file tree
Hide file tree
Showing 19 changed files with 14 additions and 44 deletions.
3 changes: 3 additions & 0 deletions app/code/Magento/Catalog/Block/Product/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,19 @@
class Image extends \Magento\Framework\View\Element\Template
{
/**
* @deprecated Property isn't used
* @var \Magento\Catalog\Helper\Image
*/
protected $imageHelper;

/**
* @deprecated Property isn't used
* @var \Magento\Catalog\Model\Product
*/
protected $product;

/**
* @deprecated Property isn't used
* @var array
*/
protected $attributes = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ define([
'jquery',
'mage/storage',
'Magento_Ui/js/model/messageList',
'Magento_Customer/js/customer-data'
], function ($, storage, globalMessageList, customerData) {
'Magento_Customer/js/customer-data',
'mage/translate'
], function ($, storage, globalMessageList, customerData, $t) {
'use strict';

var callbacks = [],
Expand Down Expand Up @@ -48,7 +49,7 @@ define([
}
}).fail(function () {
messageContainer.addErrorMessage({
'message': 'Could not authenticate. Please try again later'
'message': $t('Could not authenticate. Please try again later')
});
callbacks.forEach(function (callback) {
callback(loginData);
Expand Down
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) {
$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()) {
//
}
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;
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

0 comments on commit ac1e74c

Please sign in to comment.