Skip to content

Commit a5e978e

Browse files
committed
#28563: Edits addressing static tests
1 parent 191b758 commit a5e978e

File tree

4 files changed

+11
-14
lines changed

4 files changed

+11
-14
lines changed

app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/Product/CompositeCollectionProcessor.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ public function __construct(array $collectionProcessors = [])
3030
}
3131

3232
/**
33-
* {@inheritdoc}
33+
* Process collection to add additional joins, attributes, and clauses to a product collection.
34+
*
35+
* @param Collection $collection
36+
* @param SearchCriteriaInterface $searchCriteria
37+
* @param array $attributeNames
38+
* @param ContextInterface|null $context
39+
* @return Collection
3440
*/
3541
public function process(
3642
Collection $collection,

app/code/Magento/CatalogGraphQl/Model/Resolver/Products/Query/Filter.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
namespace Magento\CatalogGraphQl\Model\Resolver\Products\Query;
99

10-
use Magento\Catalog\Model\Layer\Resolver as LayerResolver;
1110
use Magento\Catalog\Model\Product;
1211
use Magento\Framework\Api\SearchCriteriaInterface;
1312
use Magento\Framework\Exception\InputException;
@@ -36,11 +35,6 @@ class Filter implements ProductQueryInterface
3635
*/
3736
private $productDataProvider;
3837

39-
/**
40-
* @var LayerResolver
41-
*/
42-
private $layerResolver;
43-
4438
/**
4539
* FieldSelection
4640
*/
@@ -59,22 +53,19 @@ class Filter implements ProductQueryInterface
5953
/**
6054
* @param SearchResultFactory $searchResultFactory
6155
* @param ProductProvider $productDataProvider
62-
* @param LayerResolver $layerResolver
6356
* @param FieldSelection $fieldSelection
6457
* @param SearchCriteriaBuilder $searchCriteriaBuilder
6558
* @param ScopeConfigInterface $scopeConfig
6659
*/
6760
public function __construct(
6861
SearchResultFactory $searchResultFactory,
6962
ProductProvider $productDataProvider,
70-
LayerResolver $layerResolver,
7163
FieldSelection $fieldSelection,
7264
SearchCriteriaBuilder $searchCriteriaBuilder,
7365
ScopeConfigInterface $scopeConfig
7466
) {
7567
$this->searchResultFactory = $searchResultFactory;
7668
$this->productDataProvider = $productDataProvider;
77-
$this->layerResolver = $layerResolver;
7869
$this->fieldSelection = $fieldSelection;
7970
$this->searchCriteriaBuilder = $searchCriteriaBuilder;
8071
$this->scopeConfig = $scopeConfig;

app/code/Magento/CatalogGraphQl/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"magento/module-store": "*",
1212
"magento/module-eav-graph-ql": "*",
1313
"magento/module-catalog-search": "*",
14-
"magento/framework": "*"
14+
"magento/framework": "*",
15+
"magento/module-graph-ql": "*"
1516
},
1617
"suggest": {
1718
"magento/module-graph-ql": "*",

app/code/Magento/CustomerGraphQl/Model/Context/AddUserInfoToContext.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,9 @@ public function execute(ContextParametersInterface $contextParameters): ContextP
5757
}
5858
$contextParameters->setUserType($currentUserType);
5959

60-
if ($isCustomer = $this->isCustomer($currentUserId, $currentUserType)) {
61-
62-
$contextParameters->addExtensionAttribute('is_customer', $isCustomer);
60+
$contextParameters->addExtensionAttribute('is_customer', $this->isCustomer($currentUserId, $currentUserType));
6361

62+
if ($this->isCustomer($currentUserId, $currentUserType)) {
6463
try {
6564
$customerGroupId = $this->customerRepository->getById($currentUserId)->getGroupId();
6665
} catch (\Exception $e) {

0 commit comments

Comments
 (0)