Skip to content

Commit e2f8c00

Browse files
committed
ACPT-1052: Some Luma Storefront Scenarios Are Broken
- fix review comments
1 parent c727856 commit e2f8c00

File tree

8 files changed

+14
-21
lines changed

8 files changed

+14
-21
lines changed

app/code/Magento/Catalog/Model/CategoryRepository.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525
*
2626
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2727
*/
28-
class CategoryRepository implements
29-
CategoryRepositoryInterface,
30-
ResetAfterRequestInterface
28+
class CategoryRepository implements CategoryRepositoryInterface, ResetAfterRequestInterface
3129
{
3230
/**
3331
* @var Category[]

app/code/Magento/Catalog/Model/ResourceModel/Attribute/WebsiteAttributesSynchronizer.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -420,14 +420,9 @@ private function getPlaceholderValues(array $insertions)
420420
{
421421
$placeholderValues = [];
422422
foreach ($insertions as $insertion) {
423-
// phpcs:ignore Magento2.Performance.ForeachArrayMerge
424-
$placeholderValues = array_merge(
425-
$placeholderValues,
426-
$insertion
427-
);
423+
$placeholderValues[] = $insertion;
428424
}
429-
430-
return $placeholderValues;
425+
return array_merge(...$placeholderValues);
431426
}
432427

433428
/**

app/code/Magento/Catalog/Model/ResourceModel/Product.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ protected function _afterDelete(DataObject $object)
852852
*/
853853
public function _resetState(): void
854854
{
855-
parent::_resetState(); // TODO: Change the autogenerated stub
855+
parent::_resetState();
856856
$this->availableCategoryIdsCache = [];
857857
}
858858
}

app/code/Magento/Catalog/Model/ResourceModel/Url.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
*
1111
* @author Magento Core Team <core@magentocommerce.com>
1212
*/
13-
use Magento\CatalogUrlRewrite\Model\ProductUrlRewriteGenerator;
1413
use Magento\Catalog\Api\Data\CategoryInterface;
15-
use Magento\Framework\EntityManager\MetadataPool;
16-
use Magento\Framework\App\ObjectManager;
1714
use Magento\Catalog\Model\Indexer\Category\Product\TableMaintainer;
15+
use Magento\CatalogUrlRewrite\Model\ProductUrlRewriteGenerator;
16+
use Magento\Framework\App\ObjectManager;
17+
use Magento\Framework\EntityManager\MetadataPool;
1818
use Magento\Framework\ObjectManager\ResetAfterRequestInterface;
1919

2020
/**

app/code/Magento/Directory/Model/Country.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,10 @@ public function getFormat($type)
212212
/**
213213
* Get country name
214214
*
215-
* @param ?string $locale
215+
* @param mixed $locale
216216
* @return string
217217
*/
218-
public function getName(string $locale = null)
218+
public function getName($locale = null)
219219
{
220220
if ($locale == null) {
221221
$cache_key = 'name_default';

app/code/Magento/GraphQlCache/Controller/Plugin/GraphQl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class GraphQl
6262
* @param LoggerInterface $logger
6363
* @param HttpRequestProcessor $requestProcessor
6464
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
65-
* @param ResponseHttp $response @deprecated do not useʼ
65+
* @param ResponseHttp $response @deprecated do not use
6666
* @param Registry $registry
6767
*/
6868
public function __construct(

lib/internal/Magento/Framework/GraphQl/Query/Fields.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
use GraphQL\Language\AST\DocumentNode;
1111
use GraphQL\Language\AST\Node;
1212
use GraphQL\Language\AST\NodeKind;
13-
use Magento\Framework\ObjectManager\ResetAfterRequestInterface;
1413
use Magento\Framework\App\ObjectManager;
14+
use Magento\Framework\ObjectManager\ResetAfterRequestInterface;
1515

1616
/**
1717
* This class holds a list of all queried fields and is used to enable performance optimization for schema loading.

lib/internal/Magento/Framework/View/Asset/Repository.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
namespace Magento\Framework\View\Asset;
88

9-
use Magento\Framework\ObjectManager\ResetAfterRequestInterface;
10-
use Magento\Framework\UrlInterface;
119
use Magento\Framework\App\Filesystem\DirectoryList;
1210
use Magento\Framework\App\ObjectManager;
13-
use Magento\Framework\View\Design\Theme\ThemeProviderInterface;
1411
use Magento\Framework\Exception\LocalizedException;
12+
use Magento\Framework\ObjectManager\ResetAfterRequestInterface;
13+
use Magento\Framework\UrlInterface;
14+
use Magento\Framework\View\Design\Theme\ThemeProviderInterface;
1515

1616
/**
1717
* A repository service for view assets

0 commit comments

Comments
 (0)