Skip to content

Commit 193ce22

Browse files
author
Alex Bomko
committed
MAGETWO-51947: Prepare pull request
1 parent f3837a7 commit 193ce22

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

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

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,11 @@ private function getOptionFactory()
117117
{
118118

119119
if (!($this->optionFactory)) {
120-
return ObjectManager::getInstance()->get(
120+
$this->optionFactory = ObjectManager::getInstance()->get(
121121
'\Magento\Bundle\Api\Data\OptionInterfaceFactory'
122122
);
123-
} else {
124-
return $this->optionFactory;
125123
}
124+
return $this->optionFactory;
126125
}
127126

128127
/**
@@ -135,12 +134,11 @@ private function getLinkFactory()
135134
{
136135

137136
if (!($this->linkFactory)) {
138-
return ObjectManager::getInstance()->get(
137+
$this->linkFactory = ObjectManager::getInstance()->get(
139138
'\Magento\Bundle\Api\Data\LinkInterfaceFactory'
140139
);
141-
} else {
142-
return $this->linkFactory;
143140
}
141+
return $this->linkFactory;
144142
}
145143

146144
/**
@@ -153,11 +151,10 @@ private function getProductRepository()
153151
{
154152

155153
if (!($this->productRepository)) {
156-
return ObjectManager::getInstance()->get(
154+
$this->productRepository = ObjectManager::getInstance()->get(
157155
'\Magento\Catalog\Api\ProductRepositoryInterface'
158156
);
159-
} else {
160-
return $this->productRepository;
161157
}
158+
return $this->productRepository;
162159
}
163160
}

0 commit comments

Comments
 (0)