File tree Expand file tree Collapse file tree 3 files changed +22
-10
lines changed
SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab Expand file tree Collapse file tree 3 files changed +22
-10
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,18 @@ public function __construct(
35
35
}
36
36
37
37
/**
38
- * @return \Magento\SalesRule\Model\RuleFactory
38
+ * The getter function to get the new StoreManager dependency
39
+ *
40
+ * @return \Magento\Store\Model\StoreManagerInterface
41
+ *
39
42
* @deprecated
40
43
*/
41
- public function getStoreManager ()
44
+ private function getStoreManager ()
42
45
{
43
- if ($ this ->_storeManager instanceof \ Magento \ Store \ Model \StoreManagerInterface ) {
44
- $ this ->_storeManager = ObjectManager::getInstance ()->get ('\ Magento\Store\Model\StoreManagerInterface ' );
46
+ if ($ this ->_storeManager === null ) {
47
+ $ this ->_storeManager = ObjectManager::getInstance ()->get ('Magento\Store\Model\StoreManagerInterface ' );
45
48
}
49
+ return $ this ->_storeManager ;
46
50
}
47
51
48
52
/**
Original file line number Diff line number Diff line change @@ -65,14 +65,18 @@ public function __construct(
65
65
}
66
66
67
67
/**
68
+ * The getter function to get the new RuleFactory dependency
69
+ *
68
70
* @return \Magento\SalesRule\Model\RuleFactory
71
+ *
69
72
* @deprecated
70
73
*/
71
- public function getRuleFactory ()
74
+ private function getRuleFactory ()
72
75
{
73
- if ($ this ->ruleFactory instanceof \ Magento \ SalesRule \ Model \RuleFactory ) {
74
- $ this ->ruleFactory = ObjectManager::getInstance ()->get ('\ Magento\SalesRule\Model\RuleFactory ' );
76
+ if ($ this ->ruleFactory === null ) {
77
+ $ this ->ruleFactory = ObjectManager::getInstance ()->get ('Magento\SalesRule\Model\RuleFactory ' );
75
78
}
79
+ return $ this ->ruleFactory ;
76
80
}
77
81
78
82
/**
Original file line number Diff line number Diff line change @@ -56,14 +56,18 @@ public function __construct(
56
56
}
57
57
58
58
/**
59
+ * The getter function to get the new RuleFactory dependency
60
+ *
59
61
* @return \Magento\SalesRule\Model\RuleFactory
62
+ *
60
63
* @deprecated
61
64
*/
62
- public function getRuleFactory ()
65
+ private function getRuleFactory ()
63
66
{
64
- if ($ this ->ruleFactory instanceof \ Magento \ SalesRule \ Model \RuleFactory ) {
65
- $ this ->ruleFactory = ObjectManager::getInstance ()->get ('\ Magento\SalesRule\Model\RuleFactory ' );
67
+ if ($ this ->ruleFactory === null ) {
68
+ $ this ->ruleFactory = ObjectManager::getInstance ()->get ('Magento\SalesRule\Model\RuleFactory ' );
66
69
}
70
+ return $ this ->ruleFactory ;
67
71
}
68
72
69
73
/**
You can’t perform that action at this time.
0 commit comments