Skip to content

Commit cb59746

Browse files
committed
MC-16607: Fix Unrelated Static Test Failures
- fix existing spacing - avoid FQCN usage - add required param
1 parent 74d5f33 commit cb59746

File tree

4 files changed

+28
-29
lines changed

4 files changed

+28
-29
lines changed

app/code/Magento/AdminNotification/Model/Feed.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ public function __construct(
100100
\Magento\Framework\Escaper $escaper = null
101101
) {
102102
parent::__construct($context, $registry, $resource, $resourceCollection, $data);
103-
$this->_backendConfig = $backendConfig;
104-
$this->_inboxFactory = $inboxFactory;
105-
$this->curlFactory = $curlFactory;
103+
$this->_backendConfig = $backendConfig;
104+
$this->_inboxFactory = $inboxFactory;
105+
$this->curlFactory = $curlFactory;
106106
$this->_deploymentConfig = $deploymentConfig;
107-
$this->productMetadata = $productMetadata;
108-
$this->urlBuilder = $urlBuilder;
109-
$this->escaper = $escaper ?? \Magento\Framework\App\ObjectManager::getInstance()->get(
107+
$this->productMetadata = $productMetadata;
108+
$this->urlBuilder = $urlBuilder;
109+
$this->escaper = $escaper ?? \Magento\Framework\App\ObjectManager::getInstance()->get(
110110
\Magento\Framework\Escaper::class
111111
);
112112
}

app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,25 +57,23 @@ class Edit extends \Magento\Backend\Block\Widget
5757
* @param \Magento\Eav\Model\Entity\Attribute\SetFactory $attributeSetFactory
5858
* @param \Magento\Framework\Registry $registry
5959
* @param \Magento\Catalog\Helper\Product $productHelper
60+
* @param \Magento\Framework\Escaper $escaper
6061
* @param array $data
61-
* @param \Magento\Framework\Escaper|null $escaper
6262
*/
6363
public function __construct(
6464
\Magento\Backend\Block\Template\Context $context,
6565
\Magento\Framework\Json\EncoderInterface $jsonEncoder,
6666
\Magento\Eav\Model\Entity\Attribute\SetFactory $attributeSetFactory,
6767
\Magento\Framework\Registry $registry,
6868
\Magento\Catalog\Helper\Product $productHelper,
69-
array $data = [],
70-
\Magento\Framework\Escaper $escaper = null
69+
\Magento\Framework\Escaper $escaper,
70+
array $data = []
7171
) {
7272
$this->_productHelper = $productHelper;
7373
$this->_attributeSetFactory = $attributeSetFactory;
7474
$this->_coreRegistry = $registry;
7575
$this->jsonEncoder = $jsonEncoder;
76-
$this->escaper = $escaper ?? \Magento\Framework\App\ObjectManager::getInstance()->get(
77-
\Magento\Framework\Escaper::class
78-
);
76+
$this->escaper = $escaper;
7977
parent::__construct($context, $data);
8078
}
8179

app/code/Magento/Sitemap/Model/Sitemap.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,7 @@ public function __construct(
236236
SitemapConfigReaderInterface $configReader = null,
237237
\Magento\Sitemap\Model\SitemapItemInterfaceFactory $sitemapItemFactory = null
238238
) {
239-
$this->_escaper = $escaper ?? \Magento\Framework\App\ObjectManager::getInstance()->get(
240-
\Magento\Framework\Escaper::class
241-
);
239+
$this->_escaper = $escaper;
242240
$this->_sitemapData = $sitemapData;
243241
$documentRoot = $documentRoot ?: ObjectManager::getInstance()->get(DocumentRoot::class);
244242
$this->_directory = $filesystem->getDirectoryWrite($documentRoot->getPath());

app/code/Magento/Tax/Controller/Adminhtml/Rate/AjaxSave.php

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
namespace Magento\Tax\Controller\Adminhtml\Rate;
88

99
use Magento\Framework\App\Action\HttpPostActionInterface;
10+
use Magento\Backend\App\Action\Context;
11+
use Magento\Framework\Registry;
12+
use Magento\Tax\Model\Calculation\Rate\Converter;
13+
use Magento\Tax\Api\TaxRateRepositoryInterface;
14+
use Magento\Framework\Escaper;
1015
use Magento\Framework\Controller\ResultFactory;
1116

1217
/**
@@ -15,27 +20,25 @@
1520
class AjaxSave extends \Magento\Tax\Controller\Adminhtml\Rate implements HttpPostActionInterface
1621
{
1722
/**
18-
* @var \Magento\Framework\Escaper
23+
* @var Escaper
1924
*/
2025
private $escaper;
2126

2227
/**
23-
* @param \Magento\Backend\App\Action\Context $context
24-
* @param \Magento\Framework\Registry $coreRegistry
25-
* @param \Magento\Tax\Model\Calculation\Rate\Converter $taxRateConverter
26-
* @param \Magento\Tax\Api\TaxRateRepositoryInterface $taxRateRepository
27-
* @param \Magento\Framework\Escaper|null $escaper
28+
* @param Context $context
29+
* @param Registry $coreRegistry
30+
* @param Converter $taxRateConverter
31+
* @param TaxRateRepositoryInterface $taxRateRepository
32+
* @param Escaper $escaper
2833
*/
2934
public function __construct(
30-
\Magento\Backend\App\Action\Context $context,
31-
\Magento\Framework\Registry $coreRegistry,
32-
\Magento\Tax\Model\Calculation\Rate\Converter $taxRateConverter,
33-
\Magento\Tax\Api\TaxRateRepositoryInterface $taxRateRepository,
34-
\Magento\Framework\Escaper $escaper = null
35+
Context $context,
36+
Registry $coreRegistry,
37+
Converter $taxRateConverter,
38+
TaxRateRepositoryInterface $taxRateRepository,
39+
Escaper $escaper
3540
) {
36-
$this->escaper = $escaper ?? \Magento\Framework\App\ObjectManager::getInstance()->get(
37-
\Magento\Framework\Escaper::class
38-
);
41+
$this->escaper = $escaper;
3942
parent::__construct($context, $coreRegistry, $taxRateConverter, $taxRateRepository);
4043
}
4144

0 commit comments

Comments
 (0)