File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
app/code/Magento/BundleSampleData/Model Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -117,12 +117,11 @@ private function getOptionFactory()
117
117
{
118
118
119
119
if (!($ this ->optionFactory )) {
120
- return ObjectManager::getInstance ()->get (
120
+ $ this -> optionFactory = ObjectManager::getInstance ()->get (
121
121
'\Magento\Bundle\Api\Data\OptionInterfaceFactory '
122
122
);
123
- } else {
124
- return $ this ->optionFactory ;
125
123
}
124
+ return $ this ->optionFactory ;
126
125
}
127
126
128
127
/**
@@ -135,12 +134,11 @@ private function getLinkFactory()
135
134
{
136
135
137
136
if (!($ this ->linkFactory )) {
138
- return ObjectManager::getInstance ()->get (
137
+ $ this -> linkFactory = ObjectManager::getInstance ()->get (
139
138
'\Magento\Bundle\Api\Data\LinkInterfaceFactory '
140
139
);
141
- } else {
142
- return $ this ->linkFactory ;
143
140
}
141
+ return $ this ->linkFactory ;
144
142
}
145
143
146
144
/**
@@ -153,11 +151,10 @@ private function getProductRepository()
153
151
{
154
152
155
153
if (!($ this ->productRepository )) {
156
- return ObjectManager::getInstance ()->get (
154
+ $ this -> productRepository = ObjectManager::getInstance ()->get (
157
155
'\Magento\Catalog\Api\ProductRepositoryInterface '
158
156
);
159
- } else {
160
- return $ this ->productRepository ;
161
157
}
158
+ return $ this ->productRepository ;
162
159
}
163
160
}
You can’t perform that action at this time.
0 commit comments