Skip to content

Commit d9d6dfd

Browse files
ACPT-1688: Fix Static Tests failures on Application-Server branch
1 parent 10b1920 commit d9d6dfd

File tree

23 files changed

+182
-69
lines changed

23 files changed

+182
-69
lines changed

app/code/Magento/ApplicationPerformanceMonitor/Profiler/Metric.php

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
namespace Magento\ApplicationPerformanceMonitor\Profiler;
99

1010
/**
11-
* A single metric. Type is currently either MEMORY or TIME.
11+
* A single metric. Type is currently either MEMORY or TIME.
1212
* This class is an immutable data object.
1313
*/
1414
class Metric
1515
{
1616
/**
17-
* @param int $type
17+
* @param MetricType $type
1818
* @param string $name
1919
* @param mixed $value
2020
* @param bool $verbose
@@ -28,33 +28,41 @@ public function __construct(
2828
}
2929

3030
/**
31-
* @return MetricType
31+
* Gets type of metric
32+
*
33+
* @return int|MetricType
3234
*/
33-
public function getType()
35+
public function getType(): MetricType|int
3436
{
3537
return $this->type;
3638
}
3739

3840
/**
41+
* Gets a name
42+
*
3943
* @return string
4044
*/
41-
public function getName()
45+
public function getName(): string
4246
{
4347
return $this->name;
4448
}
4549

4650
/**
51+
* Gets a value
52+
*
4753
* @return mixed
4854
*/
49-
public function getValue()
55+
public function getValue(): mixed
5056
{
5157
return $this->value;
5258
}
5359

5460
/**
61+
* Checks if verbose
62+
*
5563
* @return bool
5664
*/
57-
public function isVerbose()
65+
public function isVerbose(): bool
5866
{
5967
return $this->verbose;
6068
}

app/code/Magento/ApplicationPerformanceMonitor/Profiler/Metrics.php

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,16 @@
88
namespace Magento\ApplicationPerformanceMonitor\Profiler;
99

1010
/**
11-
* Gathers and stores metrics. Compares against another one to get the deltas.
11+
* Gathers and stores metrics. Compares against another one to get the deltas.
1212
*/
1313
class Metrics
1414
{
15+
/**
16+
* @param int $peakMemoryUsage
17+
* @param int $memoryUsage
18+
* @param array $rusage
19+
* @param float $microtime
20+
*/
1521
public function __construct(
1622
private readonly int $peakMemoryUsage,
1723
private readonly int $memoryUsage,
@@ -20,21 +26,41 @@ public function __construct(
2026
) {
2127
}
2228

29+
/**
30+
* Gets peak memory usage
31+
*
32+
* @return int
33+
*/
2334
public function getPeakMemoryUsage() : int
2435
{
2536
return $this->peakMemoryUsage;
2637
}
2738

39+
/**
40+
* Gets memory usage
41+
*
42+
* @return int
43+
*/
2844
public function getMemoryUsage() : int
2945
{
3046
return $this->memoryUsage;
3147
}
3248

49+
/**
50+
* Gets fusage
51+
*
52+
* @return array
53+
*/
3354
public function getRusage() : array
3455
{
3556
return $this->rusage;
3657
}
3758

59+
/**
60+
* Gets microtime
61+
*
62+
* @return float
63+
*/
3864
public function getMicrotime() : float
3965
{
4066
return $this->microtime;

app/code/Magento/ApplicationPerformanceMonitorNewRelic/Profiler/Output/NewRelicOutput.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ class NewRelicOutput implements OutputInterface
2020
public const CONFIG_ENABLE_KEY = 'application/performance_monitor/newrelic_output_enable';
2121
public const CONFIG_VERBOSE_KEY = 'application/performance_monitor/newrelic_output_verbose';
2222

23+
/**
24+
* @param DeploymentConfig $deploymentConfig
25+
* @param NewRelicWrapper $newRelicWrapper
26+
*/
2327
public function __construct(
2428
private readonly DeploymentConfig $deploymentConfig,
2529
private readonly NewRelicWrapper $newRelicWrapper

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

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,36 @@
1212
*/
1313
class RequestDataBuilder implements ResetAfterRequestInterface
1414
{
15+
/**
16+
* @var array
17+
*/
1518
private array $data;
1619

1720
public function __construct()
1821
{
1922
$this->_resetState();
2023
}
2124

22-
public function setData($data)
25+
/**
26+
* Sets the data
27+
*
28+
* @param $data
29+
* @return void
30+
*/
31+
public function setData($data): void
2332
{
2433
$this->data = $data;
2534
}
2635

27-
public function getData(string $key)
36+
/**
37+
* Gets the data
38+
*
39+
* @param string $key
40+
* @return mixed|null
41+
*/
42+
public function getData(string $key): mixed
2843
{
2944
return $this->data[$key] ?? null;
30-
3145
}
3246

3347
/**

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ class SearchCriteriaBuilder
6969
*/
7070
private SearchConfig $searchConfig;
7171

72+
/**
73+
* @var RequestDataBuilder|mixed
74+
*/
7275
private RequestDataBuilder $localData;
7376

7477
/**
@@ -80,6 +83,7 @@ class SearchCriteriaBuilder
8083
* @param SortOrderBuilder|null $sortOrderBuilder
8184
* @param Config|null $eavConfig
8285
* @param SearchConfig|null $searchConfig
86+
* @param RequestDataBuilder|null $localData
8387
*/
8488
public function __construct(
8589
Builder $builder,

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,14 @@ class Provider implements ProviderInterface, ResetAfterRequestInterface
3434
RegularPrice::PRICE_CODE => []
3535
];
3636

37+
/**
38+
* @var array|array[]
39+
*/
3740
private readonly array $minimalPriceConstructed;
41+
42+
/**
43+
* @var array|array[]
44+
*/
3845
private readonly array $maximalPriceConstructed;
3946

4047
public function __construct()

app/code/Magento/Config/App/Config/ReloadConfig.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,22 @@
88

99
use Magento\Config\App\Config\Type\System;
1010
use Magento\Framework\App\State\ReloadProcessorInterface;
11-
use Magento\Framework\ObjectManagerInterface;
1211

1312
/**
1413
* Config module specific reset state
1514
*/
1615
class ReloadConfig implements ReloadProcessorInterface
1716
{
17+
/**
18+
* @param System $system
19+
*/
1820
public function __construct(private readonly System $system)
19-
{}
21+
{
22+
}
2023

2124
/**
2225
* Tells the system state to reload itself.
2326
*
24-
* @param ObjectManagerInterface $objectManager
2527
* @return void
2628
*/
2729
public function reloadState(): void

app/code/Magento/Sales/Model/Order/Config.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ public function _resetState(): void
9393
$this->collection = null;
9494
}
9595

96-
9796
/**
9897
* Get collection.
9998
*
@@ -140,7 +139,6 @@ public function getStateDefaultStatus($state): ?string
140139
return $status;
141140
}
142141

143-
144142
/**
145143
* Retrieve status label for detected area
146144
*

app/code/Magento/Store/Model/Config/ReloadDeploymentConfig.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
namespace Magento\Store\Model\Config;
88

99
use Magento\Framework\App\State\ReloadProcessorInterface;
10-
use Magento\Framework\ObjectManagerInterface;
1110
use Magento\Store\App\Config\Type\Scopes;
1211
use Magento\Store\Model\GroupRepository;
1312
use Magento\Store\Model\StoreRepository;
@@ -19,24 +18,29 @@
1918
class ReloadDeploymentConfig implements ReloadProcessorInterface
2019
{
2120

21+
/**
22+
* @param StoreRepository $storeRepository
23+
* @param WebsiteRepository $websiteRepository
24+
* @param GroupRepository $groupRepository
25+
* @param Scopes $scopes
26+
*/
2227
public function __construct(
2328
private readonly StoreRepository $storeRepository,
2429
private readonly WebsiteRepository $websiteRepository,
2530
private readonly GroupRepository $groupRepository,
2631
private readonly Scopes $scopes
27-
)
28-
{}
32+
) {
33+
}
2934

3035
/**
3136
* Tells the system state to reload itself.
3237
*
33-
* @param ObjectManagerInterface $objectManager
3438
* @return void
3539
*/
3640
public function reloadState(): void
3741
{
3842
// Note: Magento\Store\Model\StoreManager::reinitStores can't be called because it flushes the caches which
39-
// we don't want to do because that is already taken care of. Instead, we call the same clean methods that
43+
// we don't want to do because that is already taken care of. Instead, we call the same clean methods that
4044
// it calls, but we skip cleaning the cache.
4145

4246
$this->storeRepository->clean();

app/code/Magento/Translation/App/Config/ReloadConfig.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
namespace Magento\Translation\App\Config;
88

99
use Magento\Framework\App\State\ReloadProcessorInterface;
10-
use Magento\Framework\ObjectManagerInterface;
1110
use Magento\Translation\App\Config\Type\Translation;
1211

1312
/**
@@ -19,12 +18,12 @@ class ReloadConfig implements ReloadProcessorInterface
1918
* @param Translation $translation
2019
*/
2120
public function __construct(private readonly Translation $translation)
22-
{}
21+
{
22+
}
2323

2424
/**
2525
* Tells the system state to reload itself.
2626
*
27-
* @param ObjectManagerInterface $objectManager
2827
* @return void
2928
*/
3029
public function reloadState(): void

0 commit comments

Comments
 (0)