Skip to content

Commit 7c6e70d

Browse files
committed
ACPT-1666: Fix race conditions in _resetState methods
1 parent 9b61b5c commit 7c6e70d

File tree

16 files changed

+50
-13
lines changed

16 files changed

+50
-13
lines changed

app/code/Magento/BundleGraphQl/Model/Cart/BuyRequest/BundleDataProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class BundleDataProvider implements BuyRequestDataProviderInterface
1919
{
2020
/**
2121
* @var ArrayManagerFactory
22+
*
23+
* @SuppressWarnings(PHPCS)
2224
*/
2325
private readonly ArrayManagerFactory $arrayManagerFactory;
2426

@@ -34,7 +36,6 @@ public function __construct(
3436
?? ObjectManager::getInstance()->get(ArrayManagerFactory::class);
3537
}
3638

37-
3839
/**
3940
* @inheritdoc
4041
*/

app/code/Magento/ConfigurableProductGraphQl/Model/Cart/BuyRequest/SuperAttributeDataProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ class SuperAttributeDataProvider implements BuyRequestDataProviderInterface
3030
{
3131
/**
3232
* @var ArrayManagerFactory
33+
*
34+
* @SuppressWarnings(PHPCS)
3335
*/
3436
private readonly ArrayManagerFactory $arrayManagerFactory;
3537

app/code/Magento/Integration/Model/CustomUserContext.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,15 @@ class CustomUserContext implements UserContextInterface
1414
{
1515
/**
1616
* @var int|null
17+
*
18+
* @SuppressWarnings(PHPCS)
1719
*/
1820
private readonly ?int $userId;
1921

2022
/**
2123
* @var int|null
24+
*
25+
* @SuppressWarnings(PHPCS)
2226
*/
2327
private readonly ?int $userType;
2428

app/code/Magento/JwtUserToken/Model/Data/JwtUserContext.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,15 @@ class JwtUserContext implements UserContextInterface
1414
{
1515
/**
1616
* @var int|null
17+
*
18+
* @SuppressWarnings(PHPCS)
1719
*/
1820
private readonly ?int $userId;
1921

2022
/**
2123
* @var int|null
24+
*
25+
* @SuppressWarnings(PHPCS)
2226
*/
2327
private readonly ?int $userType;
2428

app/code/Magento/PaypalGraphQl/Model/PayflowProAdditionalDataProvider.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ class PayflowProAdditionalDataProvider implements AdditionalDataProviderInterfac
1919
/**
2020
* @param ArrayManager $arrayManager
2121
*/
22-
public function __construct(
23-
ArrayManager $arrayManager
24-
) {
22+
public function __construct(ArrayManager $arrayManager)
23+
{
2524
}
2625

2726
/**

app/code/Magento/PaypalGraphQl/Model/PayflowProCcVaultAdditionalDataProvider.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@
1515
*/
1616
class PayflowProCcVaultAdditionalDataProvider implements AdditionalDataProviderInterface
1717
{
18-
const CC_VAULT_CODE = 'payflowpro_cc_vault';
18+
public const CC_VAULT_CODE = 'payflowpro_cc_vault';
1919

2020
/**
2121
* @param ArrayManager $arrayManager
2222
*/
23-
public function __construct(
24-
ArrayManager $arrayManager
25-
) {
23+
public function __construct(ArrayManager $arrayManager)
24+
{
2625
}
2726

2827
/**

app/code/Magento/PaypalGraphQl/Model/Plugin/Resolver/SetPaymentMethodOnCart.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ class SetPaymentMethodOnCart
2929

3030
private const PATH_PAYMENT_METHOD_DATA = 'input/payment_method';
3131

32-
private $allowedPaymentMethodCodes = [];
32+
/**
33+
* @var array $allowedPaymentMethodCodes
34+
*/
35+
private array $allowedPaymentMethodCodes = [];
3336

3437
/**
3538
* @var CheckoutFactory

app/code/Magento/Quote/Model/Quote/Address/Total/AbstractTotal.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
/**
1111
* Sales Quote Address Total abstract model
1212
*
13+
* phpcs:disable Magento2.Classes.AbstractApi
1314
* @api
1415
* @SuppressWarnings(PHPMD.NumberOfChildren)
1516
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
@@ -139,7 +140,7 @@ public function fetch(\Magento\Quote\Model\Quote $quote, \Magento\Quote\Model\Qu
139140
/**
140141
* Set address which can be used inside totals calculation
141142
*
142-
* @param \Magento\Quote\Model\Quote\Address $address
143+
* @param \Magento\Quote\Model\Quote\Address $address
143144
* @return $this
144145
*/
145146
protected function _setAddress(\Magento\Quote\Model\Quote\Address $address)
@@ -216,7 +217,7 @@ protected function _setBaseAmount($baseAmount)
216217
/**
217218
* Add total model amount value to address
218219
*
219-
* @param float $amount
220+
* @param float $amount
220221
* @return $this
221222
*/
222223
protected function _addAmount($amount)

app/code/Magento/QuoteGraphQl/Model/Cart/BuyRequest/CustomizableOptionsDataProvider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class CustomizableOptionsDataProvider implements BuyRequestDataProviderInterface
1818
{
1919
/**
2020
* @var ArrayManagerFactory
21+
*
22+
* @SuppressWarnings(PHPCS)
2123
*/
2224
private readonly ArrayManagerFactory $arrayManagerFactory;
2325

@@ -26,7 +28,8 @@ class CustomizableOptionsDataProvider implements BuyRequestDataProviderInterface
2628
* @param ArrayManagerFactory|null $arrayManagerFactory
2729
*/
2830
public function __construct(
29-
ArrayManager $arrayManager
31+
ArrayManager $arrayManager,
32+
ArrayManagerFactory $arrayManagerFactory = null
3033
) {
3134
$this->arrayManagerFactory = $arrayManagerFactory
3235
?? ObjectManager::getInstance()->get(ArrayManagerFactory::class);

app/code/Magento/QuoteGraphQl/Model/Cart/BuyRequest/QuantityDataProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class QuantityDataProvider implements BuyRequestDataProviderInterface
1919
{
2020
/**
2121
* @var ArrayManagerFactory
22+
*
23+
* @SuppressWarnings(PHPCS)
2224
*/
2325
private readonly ArrayManagerFactory $arrayManagerFactory;
2426

0 commit comments

Comments
 (0)