Skip to content

Commit d53e8e3

Browse files
committed
Fix error
1 parent 6583646 commit d53e8e3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/BitExpert_PHPStanTests/Helper/TestExtAttributes.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,15 @@
1010
class TestExtAttributes
1111
{
1212
public function __construct(
13-
\Magento\Catalog\Api\Data\ProductExtension $productExt,
14-
\Magento\InventoryApi\Api\Data\StockExtension $stockExt
13+
\Magento\Catalog\Api\Data\ProductInterface $product,
14+
\Magento\InventoryApi\Api\Data\StockInterface $stock
1515
)
1616
{
17+
/** @var \Magento\Catalog\Api\Data\ProductExtensionInterface $productExt */
18+
$productExt = $product->getExtensionAttributes();
19+
/** @var \Magento\InventoryApi\Api\Data\StockExtensionInterface $stockExt */
20+
$stockExt = $stock->getExtensionAttributes();
21+
1722
// access extension attributes defined in extension_attributes.xml in the module
1823
$productExt->setAdditionalName('Additional name');
1924
$name = $productExt->getAdditionalName();

0 commit comments

Comments
 (0)