Skip to content

Commit 8140a09

Browse files
committed
use php 8.1 shorthand syntax for constructor
1 parent 6ace728 commit 8140a09

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

app/code/Magento/CatalogInventory/Model/Plugin/ProductLinks.php

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,17 @@
1313

1414
class ProductLinks
1515
{
16-
/**
17-
* @var Configuration
18-
*/
19-
private $configuration;
20-
21-
/**
22-
* @var Stock
23-
*/
24-
private $stockHelper;
2516

2617
/**
2718
* ProductLinks constructor.
2819
*
2920
* @param Configuration $configuration
3021
* @param Stock $stockHelper
3122
*/
32-
public function __construct(Configuration $configuration, Stock $stockHelper)
33-
{
34-
$this->configuration = $configuration;
35-
$this->stockHelper = $stockHelper;
36-
}
23+
public function __construct(
24+
public readonly Configuration $configuration,
25+
public readonly Stock $stockHelper
26+
) {}
3727

3828
/**
3929
* Fixes simple products are shown as associated in grouped when set out of stock

0 commit comments

Comments
 (0)