Skip to content

Commit

Permalink
Merge pull request magento#1383 from magento-engcom/develop-prs
Browse files Browse the repository at this point in the history
Public Pull Requests

magento#10420
  • Loading branch information
Oleksii Korshenko authored Aug 4, 2017
2 parents 43749c2 + caaf7df commit 249863e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/code/Magento/Tax/Controller/Adminhtml/Rate/AjaxLoad.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Tax\Controller\Adminhtml\Rate;

use Magento\Framework\Exception\NoSuchEntityException;
Expand All @@ -14,7 +15,8 @@ class AjaxLoad extends \Magento\Tax\Controller\Adminhtml\Rate
/**
* Json needed for the Ajax Edit Form
*
* @return void
* @return \Magento\Framework\Controller\Result\Json
* @throws \InvalidArgumentException
*/
public function execute()
{
Expand All @@ -23,13 +25,13 @@ public function execute()
/* @var \Magento\Tax\Api\Data\TaxRateInterface */
$taxRateDataObject = $this->_taxRateRepository->get($rateId);
/* @var array */
$resultArray= $this->_taxRateConverter->createArrayFromServiceObject($taxRateDataObject, true);
$resultArray = $this->_taxRateConverter->createArrayFromServiceObject($taxRateDataObject, true);

$responseContent = [
'success' => true,
'error_message' => '',
'result'=>$resultArray,
];
'result' => $resultArray,
];
} catch (NoSuchEntityException $e) {
$responseContent = [
'success' => false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class AjaxSave extends \Magento\Tax\Controller\Adminhtml\Rate
* Save Tax Rate via AJAX
*
* @return \Magento\Framework\Controller\Result\Json
* @throws \InvalidArgumentException
*/
public function execute()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public function __construct(
* Get rates page via AJAX
*
* @return Json
* @throws \InvalidArgumentException
*/
public function execute()
{
Expand Down
2 changes: 2 additions & 0 deletions app/code/Magento/Tax/Controller/Adminhtml/Tax/AjaxDelete.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class AjaxDelete extends \Magento\Tax\Controller\Adminhtml\Tax
* Delete Tax Class via AJAX
*
* @return \Magento\Framework\Controller\Result\Json
* @throws \InvalidArgumentException
*/
public function execute()
{
Expand All @@ -29,6 +30,7 @@ public function execute()
'error_message' => __('We can\'t delete this tax class right now.')
];
}

/** @var \Magento\Framework\Controller\Result\Json $resultJson */
$resultJson = $this->resultFactory->create(ResultFactory::TYPE_JSON);
$resultJson->setData($responseContent);
Expand Down
2 changes: 2 additions & 0 deletions app/code/Magento/Tax/Controller/Adminhtml/Tax/AjaxSave.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class AjaxSave extends \Magento\Tax\Controller\Adminhtml\Tax
* Save Tax Class via AJAX
*
* @return \Magento\Framework\Controller\Result\Json
* @throws \InvalidArgumentException
*/
public function execute()
{
Expand Down Expand Up @@ -47,6 +48,7 @@ public function execute()
'class_name' => '',
];
}

/** @var \Magento\Framework\Controller\Result\Json $resultJson */
$resultJson = $this->resultFactory->create(ResultFactory::TYPE_JSON);
$resultJson->setData($responseContent);
Expand Down

0 comments on commit 249863e

Please sign in to comment.