Skip to content

Commit 66f1460

Browse files
committed
Update the return type in the tax rate ajax controllers to be correct
1 parent 4c9194d commit 66f1460

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

app/code/Magento/Tax/Controller/Adminhtml/Rate/AjaxLoad.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7+
78
namespace Magento\Tax\Controller\Adminhtml\Rate;
89

910
use Magento\Framework\Exception\NoSuchEntityException;
@@ -14,7 +15,8 @@ class AjaxLoad extends \Magento\Tax\Controller\Adminhtml\Rate
1415
/**
1516
* Json needed for the Ajax Edit Form
1617
*
17-
* @return void
18+
* @return \Magento\Framework\Controller\Result\Json
19+
* @throws \InvalidArgumentException
1820
*/
1921
public function execute()
2022
{
@@ -23,13 +25,13 @@ public function execute()
2325
/* @var \Magento\Tax\Api\Data\TaxRateInterface */
2426
$taxRateDataObject = $this->_taxRateRepository->get($rateId);
2527
/* @var array */
26-
$resultArray= $this->_taxRateConverter->createArrayFromServiceObject($taxRateDataObject, true);
28+
$resultArray = $this->_taxRateConverter->createArrayFromServiceObject($taxRateDataObject, true);
2729

2830
$responseContent = [
2931
'success' => true,
3032
'error_message' => '',
31-
'result'=>$resultArray,
32-
];
33+
'result' => $resultArray,
34+
];
3335
} catch (NoSuchEntityException $e) {
3436
$responseContent = [
3537
'success' => false,

app/code/Magento/Tax/Controller/Adminhtml/Rate/AjaxSave.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class AjaxSave extends \Magento\Tax\Controller\Adminhtml\Rate
1414
* Save Tax Rate via AJAX
1515
*
1616
* @return \Magento\Framework\Controller\Result\Json
17+
* @throws \InvalidArgumentException
1718
*/
1819
public function execute()
1920
{

0 commit comments

Comments
 (0)