Skip to content

Commit 3b1a80e

Browse files
ACPT-1688: Fix Static Tests failures on Application-Server branch 2
1 parent d9d6dfd commit 3b1a80e

File tree

8 files changed

+59
-10
lines changed

8 files changed

+59
-10
lines changed

app/code/Magento/CatalogGraphQl/DataProvider/Product/RequestDataBuilder.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,29 @@ class RequestDataBuilder implements ResetAfterRequestInterface
1717
*/
1818
private array $data;
1919

20+
/**
21+
* Constructor
22+
*
23+
* @return void
24+
*/
2025
public function __construct()
2126
{
2227
$this->_resetState();
2328
}
2429

2530
/**
26-
* Sets the data
31+
* Sets request data
2732
*
28-
* @param $data
33+
* @param array $data
2934
* @return void
3035
*/
31-
public function setData($data): void
36+
public function setData(array $data): void
3237
{
3338
$this->data = $data;
3439
}
3540

3641
/**
37-
* Gets the data
42+
* Gets request data
3843
*
3944
* @param string $key
4045
* @return mixed|null

app/code/Magento/CatalogGraphQl/DataProvider/Product/SearchCriteriaBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class SearchCriteriaBuilder
7070
private SearchConfig $searchConfig;
7171

7272
/**
73-
* @var RequestDataBuilder|mixed
73+
* @var RequestDataBuilder|mixed
7474
*/
7575
private RequestDataBuilder $localData;
7676

app/code/Magento/CatalogGraphQl/Model/Resolver/Product/Price/Provider.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,21 @@ class Provider implements ProviderInterface, ResetAfterRequestInterface
3636

3737
/**
3838
* @var array|array[]
39+
*
40+
* @SuppressWarnings(PHPCS)
3941
*/
4042
private readonly array $minimalPriceConstructed;
4143

4244
/**
4345
* @var array|array[]
46+
*
47+
* @SuppressWarnings(PHPCS)
4448
*/
4549
private readonly array $maximalPriceConstructed;
4650

51+
/**
52+
* Constructor
53+
*/
4754
public function __construct()
4855
{
4956
$this->minimalPriceConstructed = $this->minimalPrice;

dev/tests/integration/testsuite/Magento/GraphQl/App/State/GraphQlStateDiff.php

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,30 @@ class GraphQlStateDiff
3434
{
3535
private const CONTENT_TYPE = 'application/json';
3636

37-
/** @var ObjectManagerInterface */
37+
/**
38+
* @var ObjectManagerInterface
39+
*
40+
* @SuppressWarnings(PHPCS)
41+
*/
3842
private readonly ObjectManagerInterface $objectManagerBeforeTest;
3943

40-
/** @var ObjectManager */
44+
/**
45+
* @var ObjectManager
46+
*
47+
* @SuppressWarnings(PHPCS)
48+
*/
4149
private readonly ObjectManager $objectManagerForTest;
4250

43-
/** @var Comparator */
51+
/**
52+
* @var Comparator
53+
*
54+
* @SuppressWarnings(PHPCS)
55+
*/
4456
private readonly Comparator $comparator;
4557

58+
/**
59+
* Constructor
60+
*/
4661
public function __construct()
4762
{
4863
$this->objectManagerBeforeTest = Bootstrap::getObjectManager();
@@ -55,6 +70,8 @@ public function __construct()
5570
}
5671

5772
/**
73+
* Gets test object manager
74+
*
5875
* @return ObjectManager
5976
*/
6077
public function getTestObjectManager()
@@ -73,6 +90,8 @@ public function tearDown(): void
7390
}
7491

7592
/**
93+
* Tests state
94+
*
7695
* @param string $query
7796
* @param array $variables
7897
* @param array $variables2
@@ -133,6 +152,8 @@ public function testState(
133152
}
134153

135154
/**
155+
* Makes request
156+
*
136157
* @param string $query
137158
* @param string $operationName
138159
* @param array $authInfo
@@ -208,6 +229,8 @@ private function doRequest(string $query, array $authInfo)
208229
}
209230

210231
/**
232+
* Removes coupon from cart
233+
*
211234
* @param array $variables
212235
* @return void
213236
* @throws NoSuchEntityException
@@ -221,6 +244,8 @@ private function removeCouponFromCart(array $variables)
221244
}
222245

223246
/**
247+
* Reactivates cart
248+
*
224249
* @param string $cartId
225250
* @return void
226251
* @throws NoSuchEntityException
@@ -235,6 +260,8 @@ private function reactivateCart(string $cartId)
235260
}
236261

237262
/**
263+
* Gets cart id
264+
*
238265
* @param string $cartId
239266
* @return int
240267
* @throws NoSuchEntityException
@@ -246,6 +273,8 @@ private function getCartId(string $cartId)
246273
}
247274

248275
/**
276+
* Gets cart id hash
277+
*
249278
* @param string $cartId
250279
* @return string
251280
* @throws NoSuchEntityException

lib/internal/Magento/Framework/App/Cache/State.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class State implements StateInterface, ResetAfterRequestInterface
2020
/**
2121
* Disallow cache
2222
*/
23-
const PARAM_BAN_CACHE = 'global_ban_use_cache';
23+
public const PARAM_BAN_CACHE = 'global_ban_use_cache';
2424

2525
/**
2626
* Deployment config key
@@ -38,20 +38,24 @@ class State implements StateInterface, ResetAfterRequestInterface
3838
* Deployment configuration storage writer
3939
*
4040
* @var Writer
41+
*
42+
* @SuppressWarnings(PHPCS)
4143
*/
4244
private readonly Writer $writer;
4345

4446
/**
4547
* Associative array of cache type codes and their statuses (enabled/disabled)
4648
*
4749
* @var array|null
50+
* @SuppressWarnings(PHPCS)
4851
*/
4952
private ?array $statuses = null;
5053

5154
/**
5255
* Whether all cache types are forced to be disabled
5356
*
5457
* @var bool
58+
* @SuppressWarnings(PHPCS)
5559
*/
5660
private readonly bool $banAll;
5761

@@ -125,7 +129,7 @@ private function load(): void
125129
}
126130

127131
/**
128-
* {@inheritdoc}
132+
* @inheritdoc
129133
*/
130134
public function _resetState(): void
131135
{

lib/internal/Magento/Framework/TestFramework/ApplicationStateComparator/Collector.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ function ($element) use (
8989
* @param ShouldResetState $shouldResetState
9090
* @return CollectedObject[]
9191
* @throws \Exception
92+
* @SuppressWarnings(PHPCS)
9293
*/
9394
public function getSharedObjects(ShouldResetState $shouldResetState): array
9495
{
@@ -128,6 +129,7 @@ public function getSharedObjects(ShouldResetState $shouldResetState): array
128129
*
129130
* @return CollectedObjectConstructedAndCurrent[]
130131
* @throws \Exception
132+
* @SuppressWarnings(PHPCS)
131133
*/
132134
public function getPropertiesConstructedAndCurrent(): array
133135
{

lib/internal/Magento/Framework/TestFramework/ApplicationStateComparator/Comparator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ private function formatValue($value): mixed
232232
* @return array
233233
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
234234
* @throws \Exception
235+
* @SuppressWarnings(PHPCS)
235236
*/
236237
public function checkValues(mixed $before, mixed $after, array $skipList): array
237238
{

lib/internal/Magento/Framework/TestFramework/ApplicationStateComparator/ObjectManager.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class ObjectManager extends TestFrameworkObjectManager implements ObjectManagerI
2020
* Constructs this instance by copying test framework's ObjectManager
2121
*
2222
* @param TestFrameworkObjectManager $testFrameworkObjectManager
23+
* @SuppressWarnings(PHPCS)
2324
*/
2425
private array $bootstrappedObjects = [
2526
// Note: These are after $objectManager = $this->_factory->create($overriddenParams);

0 commit comments

Comments
 (0)