5
5
*/
6
6
namespace Magento \Checkout \Controller \Sidebar ;
7
7
8
- use Magento \Checkout \Model \Sidebar ;
9
- use Magento \Framework \App \Action \Action ;
10
- use Magento \Framework \App \Action \Context ;
11
- use Magento \Framework \App \Response \Http ;
12
- use Magento \Framework \Exception \LocalizedException ;
13
- use Magento \Framework \Json \Helper \Data ;
14
- use Magento \Framework \View \Result \PageFactory ;
15
- use Psr \Log \LoggerInterface ;
16
8
17
- class RemoveItem extends Action
9
+ class RemoveItem extends \ Magento \ Framework \ App \ Action \ Action
18
10
{
19
11
/**
20
- * @var Sidebar
12
+ * @var \Magento\Checkout\Model\ Sidebar
21
13
*/
22
14
protected $ sidebar ;
23
15
24
16
/**
25
- * @var LoggerInterface
17
+ * @var \Psr\Log\ LoggerInterface
26
18
*/
27
19
protected $ logger ;
28
20
29
21
/**
30
- * @var Data
22
+ * @var \Magento\Framework\Json\Helper\ Data
31
23
*/
32
24
protected $ jsonHelper ;
33
25
34
26
/**
35
- * @var PageFactory
27
+ * @var \Magento\Framework\View\Result\ PageFactory
36
28
*/
37
29
protected $ resultPageFactory ;
38
30
@@ -42,18 +34,18 @@ class RemoveItem extends Action
42
34
private $ formKeyValidator ;
43
35
44
36
/**
45
- * @param Context $context
46
- * @param Sidebar $sidebar
47
- * @param LoggerInterface $logger
48
- * @param Data $jsonHelper
49
- * @param PageFactory $resultPageFactory
37
+ * @param \Magento\Framework\App\Action\ Context $context
38
+ * @param \Magento\Checkout\Model\ Sidebar $sidebar
39
+ * @param \Psr\Log\ LoggerInterface $logger
40
+ * @param \Magento\Framework\Json\Helper\ Data $jsonHelper
41
+ * @param \Magento\Framework\View\Result\ PageFactory $resultPageFactory
50
42
*/
51
43
public function __construct (
52
- Context $ context ,
53
- Sidebar $ sidebar ,
54
- LoggerInterface $ logger ,
55
- Data $ jsonHelper ,
56
- PageFactory $ resultPageFactory
44
+ \ Magento \ Framework \ App \ Action \ Context $ context ,
45
+ \ Magento \ Checkout \ Model \ Sidebar $ sidebar ,
46
+ \ Psr \ Log \ LoggerInterface $ logger ,
47
+ \ Magento \ Framework \ Json \ Helper \ Data $ jsonHelper ,
48
+ \ Magento \ Framework \ View \ Result \ PageFactory $ resultPageFactory
57
49
) {
58
50
$ this ->sidebar = $ sidebar ;
59
51
$ this ->logger = $ logger ;
@@ -75,7 +67,7 @@ public function execute()
75
67
$ this ->sidebar ->checkQuoteItem ($ itemId );
76
68
$ this ->sidebar ->removeQuoteItem ($ itemId );
77
69
return $ this ->jsonResponse ();
78
- } catch (LocalizedException $ e ) {
70
+ } catch (\ Magento \ Framework \ Exception \ LocalizedException $ e ) {
79
71
return $ this ->jsonResponse ($ e ->getMessage ());
80
72
} catch (\Exception $ e ) {
81
73
$ this ->logger ->critical ($ e );
@@ -87,7 +79,7 @@ public function execute()
87
79
* Compile JSON response
88
80
*
89
81
* @param string $error
90
- * @return Http
82
+ * @return \Magento\Framework\App\Response\ Http
91
83
*/
92
84
protected function jsonResponse ($ error = '' )
93
85
{
0 commit comments