Skip to content

Commit 827c999

Browse files
Roman HaninRoman Hanin
authored andcommitted
B2B-2424: Optimize permissions read in addProductsToCart mutation
1 parent 939e556 commit 827c999

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

app/code/Magento/QuoteGraphQl/Model/CartItem/PrecursorComposite.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ class PrecursorComposite implements PrecursorInterface
1919
*/
2020
private $precursors = [];
2121

22-
/**
23-
* @var array
24-
*/
25-
private $errors = [];
26-
2722
/**
2823
* @param array $precursors
2924
*/
@@ -33,19 +28,18 @@ public function __construct(array $precursors)
3328
}
3429

3530
/**
36-
* @inheirtdoc
31+
* @inheritdoc
3732
*/
3833
public function process(array $cartItemData, ContextInterface $context): array
3934
{
4035
foreach ($this->precursors as $precursor) {
4136
$cartItemData = $precursor->process($cartItemData, $context);
42-
array_merge($this->errors, $precursor->getErrors());
4337
}
4438
return $cartItemData;
4539
}
4640

4741
/**
48-
* @inheirtdoc
42+
* @inheritdoc
4943
*/
5044
public function getErrors(): array
5145
{

app/code/Magento/QuoteGraphQl/Model/CartItem/PrecursorInterface.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ interface PrecursorInterface extends ItemDataProcessorInterface
1919
/**
2020
* Preprocess cart items for Graphql request.
2121
*
22-
* @param ContextInterface $context
2322
* @param array $cartItemData
23+
* @param ContextInterface $context
24+
*
2425
* @return array
2526
*/
2627
public function process(array $cartItemData, ContextInterface $context): array;

0 commit comments

Comments
 (0)