Skip to content

Commit c57d4d0

Browse files
author
Gabriel Galvao da Gama
committed
Removed unnecessary parameter
1 parent 7da12c1 commit c57d4d0

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

app/code/Magento/Bundle/Model/LinkManagement.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,11 @@ public function saveChild(
173173
)
174174
);
175175
}
176-
$linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField();
177176
$selectionModel = $this->mapProductLinkToBundleSelectionModel(
178177
$selectionModel,
179178
$linkedProduct,
180179
$product,
181-
(int)$linkProductModel->getId(),
182-
$linkField
180+
(int)$linkProductModel->getId()
183181
);
184182

185183
try {
@@ -256,9 +254,9 @@ private function mapProductLinkToBundleSelectionModel(
256254
Selection $selectionModel,
257255
LinkInterface $productLink,
258256
ProductInterface $parentProduct,
259-
int $linkedProductId,
260-
string $linkField
257+
int $linkedProductId
261258
): Selection {
259+
$linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField();
262260
$selectionModel->setProductId($linkedProductId);
263261
$selectionModel->setParentProductId($parentProduct->getData($linkField));
264262
if ($productLink->getSelectionId() !== null) {
@@ -357,8 +355,7 @@ public function addChild(
357355
$selectionModel,
358356
$linkedProduct,
359357
$product,
360-
(int)$linkProductModel->getEntityId(),
361-
$linkField
358+
(int)$linkProductModel->getEntityId()
362359
);
363360

364361
$selectionModel->setOptionId($optionId);

0 commit comments

Comments
 (0)