File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/BitExpert_PHPStanTests/Helper Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 10
10
class TestExtAttributes
11
11
{
12
12
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
15
15
)
16
16
{
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
+
17
22
// access extension attributes defined in extension_attributes.xml in the module
18
23
$ productExt ->setAdditionalName ('Additional name ' );
19
24
$ name = $ productExt ->getAdditionalName ();
You can’t perform that action at this time.
0 commit comments