Skip to content

Commit c63286e

Browse files
committed
Updated the jsonSerializer as optional parameters
1 parent 672df31 commit c63286e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,36 +33,36 @@ class Breadcrumbs extends DataObject implements ArgumentInterface
3333
private $scopeConfig;
3434

3535
/**
36-
* @var JsonHexTag
36+
* @var Escaper
3737
*/
38-
private $jsonSerializer;
38+
private $escaper;
3939

4040
/**
41-
* @var Escaper
41+
* @var JsonHexTag
4242
*/
43-
private $escaper;
43+
private $jsonSerializer;
4444

4545
/**
4646
* @param Data $catalogData
4747
* @param ScopeConfigInterface $scopeConfig
4848
* @param Json|null $json
49-
* @param JsonHexTag $jsonSerializer
5049
* @param Escaper|null $escaper
50+
* @param JsonHexTag|null $jsonSerializer
5151
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
5252
*/
5353
public function __construct(
5454
Data $catalogData,
5555
ScopeConfigInterface $scopeConfig,
5656
Json $json = null,
57-
JsonHexTag $jsonSerializer,
58-
Escaper $escaper = null
57+
Escaper $escaper = null,
58+
JsonHexTag $jsonSerializer = null
5959
) {
6060
parent::__construct();
6161

6262
$this->catalogData = $catalogData;
6363
$this->scopeConfig = $scopeConfig;
64-
$this->jsonSerializer = $jsonSerializer;
6564
$this->escaper = $escaper ?: ObjectManager::getInstance()->get(Escaper::class);
65+
$this->jsonSerializer = $jsonSerializer ?: ObjectManager::getInstance()->get(JsonHexTag::class);
6666
}
6767

6868
/**

0 commit comments

Comments
 (0)