Skip to content

Commit 6da9d38

Browse files
ACPT-1194-part1
fixing static tests
1 parent 65ee2a3 commit 6da9d38

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

app/code/Magento/Eav/Model/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ public function _resetState(): void
991991
$this->attributesPerSet = [];
992992
$this->_attributeData = [];
993993
foreach ($this->attributes ?? [] as $attributesGroupedByEntityTypeCode) {
994-
foreach ($attributesGroupedByEntityTypeCode ?? [] as $attribute) {
994+
foreach ($attributesGroupedByEntityTypeCode as $attribute) {
995995
if ($attribute instanceof ResetAfterRequestInterface) {
996996
$attribute->_resetState();
997997
}

app/code/Magento/WeeeGraphQl/Model/Resolver/StoreConfig.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo;
1111
use Magento\Framework\GraphQl\Config\Element\Field;
1212
use Magento\Framework\GraphQl\Query\ResolverInterface;
13+
use Magento\Framework\ObjectManager\ResetAfterRequestInterface;
1314
use Magento\Weee\Helper\Data;
1415
use Magento\Tax\Helper\Data as TaxHelper;
1516
use Magento\Store\Api\Data\StoreInterface;
@@ -19,7 +20,7 @@
1920
/**
2021
* Resolver for the FPT store config settings
2122
*/
22-
class StoreConfig implements ResolverInterface
23+
class StoreConfig implements ResolverInterface, ResetAfterRequestInterface
2324
{
2425
/**
2526
* @var string
@@ -61,6 +62,14 @@ public function __construct(Data $weeeHelper, TaxHelper $taxHelper)
6162
$this->taxHelper = $taxHelper;
6263
}
6364

65+
/**
66+
* @inheritDoc
67+
*/
68+
public function _resetState(): void
69+
{
70+
$this->computedFptSettings = [];
71+
}
72+
6473
/**
6574
* @inheritdoc
6675
*/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ public function execute(): void
101101
*
102102
* @param string $query
103103
* @throws GraphQlInputException
104+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
104105
*/
105106
public function validateFieldCount(string $query): void
106107
{
@@ -117,7 +118,6 @@ public function validateFieldCount(string $query): void
117118
]
118119
]
119120
);
120-
121121
if ($totalFieldCount > $this->queryComplexity) {
122122
throw new GraphQlInputException(__(
123123
'Max query complexity should be %1 but got %2.',

0 commit comments

Comments
 (0)