Skip to content

Commit f1ccb7c

Browse files
committed
Removing the Wishlist dependency
1 parent 560c59f commit f1ccb7c

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

app/code/Magento/Bundle/Model/Product/BundleOptionDataProvider.php

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010
use Magento\Bundle\Helper\Catalog\Product\Configuration;
1111
use Magento\Bundle\Model\Option;
1212
use Magento\Catalog\Model\Product;
13-
use Magento\Framework\Exception\LocalizedException;
13+
use Magento\Catalog\Model\Product\Configuration\Item\ItemInterface;
1414
use Magento\Framework\Pricing\Helper\Data;
1515
use Magento\Framework\Serialize\SerializerInterface;
16-
use Magento\Wishlist\Model\Item;
1716

1817
/**
1918
* Data provider for bundled product options
@@ -51,13 +50,13 @@ public function __construct(
5150
}
5251

5352
/**
54-
* Extract data for a bundled wishlist item
53+
* Extract data for a bundled item
5554
*
56-
* @param Item $item
55+
* @param ItemInterface $item
5756
*
5857
* @return array
5958
*/
60-
public function getData(Item $item): array
59+
public function getData(ItemInterface $item): array
6160
{
6261
$options = [];
6362
$product = $item->getProduct();
@@ -89,11 +88,11 @@ public function getData(Item $item): array
8988
* Build bundle product options based on current selection
9089
*
9190
* @param Option[] $bundleOptions
92-
* @param Item $item
91+
* @param ItemInterface $item
9392
*
9493
* @return array
9594
*/
96-
private function buildBundleOptions(array $bundleOptions, Item $item): array
95+
private function buildBundleOptions(array $bundleOptions, ItemInterface $item): array
9796
{
9897
$options = [];
9998
foreach ($bundleOptions as $bundleOption) {
@@ -116,13 +115,11 @@ private function buildBundleOptions(array $bundleOptions, Item $item): array
116115
* Build bundle product option values based on current selection
117116
*
118117
* @param Product[] $selections
119-
* @param Item $item
118+
* @param ItemInterface $item
120119
*
121120
* @return array
122-
*
123-
* @throws LocalizedException
124121
*/
125-
private function buildBundleOptionValues(array $selections, Item $item): array
122+
private function buildBundleOptionValues(array $selections, ItemInterface $item): array
126123
{
127124
$product = $item->getProduct();
128125
$values = [];

0 commit comments

Comments
 (0)