File tree Expand file tree Collapse file tree 5 files changed +12
-4
lines changed
app/code/Magento/Tax/Controller/Adminhtml Expand file tree Collapse file tree 5 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 4
4
* Copyright © Magento, Inc. All rights reserved.
5
5
* See COPYING.txt for license details.
6
6
*/
7
+
7
8
namespace Magento \Tax \Controller \Adminhtml \Rate ;
8
9
9
10
use Magento \Framework \Exception \NoSuchEntityException ;
@@ -14,7 +15,8 @@ class AjaxLoad extends \Magento\Tax\Controller\Adminhtml\Rate
14
15
/**
15
16
* Json needed for the Ajax Edit Form
16
17
*
17
- * @return void
18
+ * @return \Magento\Framework\Controller\Result\Json
19
+ * @throws \InvalidArgumentException
18
20
*/
19
21
public function execute ()
20
22
{
@@ -23,13 +25,13 @@ public function execute()
23
25
/* @var \Magento\Tax\Api\Data\TaxRateInterface */
24
26
$ taxRateDataObject = $ this ->_taxRateRepository ->get ($ rateId );
25
27
/* @var array */
26
- $ resultArray = $ this ->_taxRateConverter ->createArrayFromServiceObject ($ taxRateDataObject , true );
28
+ $ resultArray = $ this ->_taxRateConverter ->createArrayFromServiceObject ($ taxRateDataObject , true );
27
29
28
30
$ responseContent = [
29
31
'success ' => true ,
30
32
'error_message ' => '' ,
31
- 'result ' => $ resultArray ,
32
- ];
33
+ 'result ' => $ resultArray ,
34
+ ];
33
35
} catch (NoSuchEntityException $ e ) {
34
36
$ responseContent = [
35
37
'success ' => false ,
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ class AjaxSave extends \Magento\Tax\Controller\Adminhtml\Rate
14
14
* Save Tax Rate via AJAX
15
15
*
16
16
* @return \Magento\Framework\Controller\Result\Json
17
+ * @throws \InvalidArgumentException
17
18
*/
18
19
public function execute ()
19
20
{
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ public function __construct(
48
48
* Get rates page via AJAX
49
49
*
50
50
* @return Json
51
+ * @throws \InvalidArgumentException
51
52
*/
52
53
public function execute ()
53
54
{
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ class AjaxDelete extends \Magento\Tax\Controller\Adminhtml\Tax
14
14
* Delete Tax Class via AJAX
15
15
*
16
16
* @return \Magento\Framework\Controller\Result\Json
17
+ * @throws \InvalidArgumentException
17
18
*/
18
19
public function execute ()
19
20
{
@@ -29,6 +30,7 @@ public function execute()
29
30
'error_message ' => __ ('We can \'t delete this tax class right now. ' )
30
31
];
31
32
}
33
+
32
34
/** @var \Magento\Framework\Controller\Result\Json $resultJson */
33
35
$ resultJson = $ this ->resultFactory ->create (ResultFactory::TYPE_JSON );
34
36
$ resultJson ->setData ($ responseContent );
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ class AjaxSave extends \Magento\Tax\Controller\Adminhtml\Tax
14
14
* Save Tax Class via AJAX
15
15
*
16
16
* @return \Magento\Framework\Controller\Result\Json
17
+ * @throws \InvalidArgumentException
17
18
*/
18
19
public function execute ()
19
20
{
@@ -47,6 +48,7 @@ public function execute()
47
48
'class_name ' => '' ,
48
49
];
49
50
}
51
+
50
52
/** @var \Magento\Framework\Controller\Result\Json $resultJson */
51
53
$ resultJson = $ this ->resultFactory ->create (ResultFactory::TYPE_JSON );
52
54
$ resultJson ->setData ($ responseContent );
You can’t perform that action at this time.
0 commit comments