File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
app/code/Magento/DownloadableSampleData/Model Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -188,13 +188,12 @@ protected function prepareProduct($product, $data)
188
188
private function getLinkFactory ()
189
189
{
190
190
191
- if (!( $ this ->linkFactory ) ) {
192
- return ObjectManager::getInstance ()->get (
191
+ if (!$ this ->linkFactory ) {
192
+ $ this -> linkFactory = ObjectManager::getInstance ()->get (
193
193
'\Magento\Downloadable\Api\Data\LinkInterfaceFactory '
194
194
);
195
- } else {
196
- return $ this ->linkFactory ;
197
195
}
196
+ return $ this ->linkFactory ;
198
197
}
199
198
200
199
/**
@@ -206,12 +205,11 @@ private function getLinkFactory()
206
205
private function getSampleFactory ()
207
206
{
208
207
209
- if (!( $ this ->sampleFactory ) ) {
210
- return ObjectManager::getInstance ()->get (
208
+ if (!$ this ->sampleFactory ) {
209
+ $ this -> sampleFactory = ObjectManager::getInstance ()->get (
211
210
'\Magento\Downloadable\Api\Data\SampleInterfaceFactory '
212
211
);
213
- } else {
214
- return $ this ->sampleFactory ;
215
212
}
213
+ return $ this ->sampleFactory ;
216
214
}
217
215
}
You can’t perform that action at this time.
0 commit comments