Skip to content

Commit 7b13d39

Browse files
author
Alex Bomko
committed
MAGETWO-51947: Prepare pull request
1 parent 062a0c2 commit 7b13d39

File tree

1 file changed

+6
-8
lines changed
  • app/code/Magento/DownloadableSampleData/Model

1 file changed

+6
-8
lines changed

app/code/Magento/DownloadableSampleData/Model/Product.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,12 @@ protected function prepareProduct($product, $data)
188188
private function getLinkFactory()
189189
{
190190

191-
if (!($this->linkFactory)) {
192-
return ObjectManager::getInstance()->get(
191+
if (!$this->linkFactory) {
192+
$this->linkFactory = ObjectManager::getInstance()->get(
193193
'\Magento\Downloadable\Api\Data\LinkInterfaceFactory'
194194
);
195-
} else {
196-
return $this->linkFactory;
197195
}
196+
return $this->linkFactory;
198197
}
199198

200199
/**
@@ -206,12 +205,11 @@ private function getLinkFactory()
206205
private function getSampleFactory()
207206
{
208207

209-
if (!($this->sampleFactory)) {
210-
return ObjectManager::getInstance()->get(
208+
if (!$this->sampleFactory) {
209+
$this->sampleFactory = ObjectManager::getInstance()->get(
211210
'\Magento\Downloadable\Api\Data\SampleInterfaceFactory'
212211
);
213-
} else {
214-
return $this->sampleFactory;
215212
}
213+
return $this->sampleFactory;
216214
}
217215
}

0 commit comments

Comments
 (0)