Skip to content

Commit eb0d2ed

Browse files
Merge pull request #567 from magento-performance/ACPT-1587
ACPT-1587: fixing static test failures for ACPT-1587
2 parents a495fed + 5029ce9 commit eb0d2ed

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

app/code/Magento/GraphQlNewRelic/Plugin/ReportError.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ class ReportError
1919
/**
2020
* @param NewRelicWrapper $newRelicWrapper
2121
*/
22-
public function __construct(private NewRelicWrapper $newRelicWrapper) {
22+
public function __construct(private NewRelicWrapper $newRelicWrapper)
23+
{
2324
}
2425

2526
/**
@@ -31,8 +32,8 @@ public function __construct(private NewRelicWrapper $newRelicWrapper) {
3132
* @return null
3233
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
3334
*/
34-
public function beforeHandle(ErrorHandler $subject, array $errors, callable $formatter
35-
): null {
35+
public function beforeHandle(ErrorHandler $subject, array $errors, callable $formatter)
36+
{
3637
if (!empty($errors)) {
3738
$this->newRelicWrapper->reportError($errors[0]); // Note: We only log the first error because performance
3839
}

app/code/Magento/GraphQlNewRelic/Plugin/ReportException.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ class ReportException
1818
/**
1919
* @param NewRelicWrapper $newRelicWrapper
2020
*/
21-
public function __construct(private NewRelicWrapper $newRelicWrapper) {
21+
public function __construct(private NewRelicWrapper $newRelicWrapper)
22+
{
2223
}
2324

2425
/**
@@ -33,8 +34,8 @@ public function __construct(private NewRelicWrapper $newRelicWrapper) {
3334
public function beforeCheck(
3435
ExceptionFormatter $subject,
3536
\Throwable $exception,
36-
string $internalErrorMessage= null
37-
): null {
37+
string $internalErrorMessage = null
38+
) {
3839
$this->newRelicWrapper->reportError($exception);
3940
return null;
4041
}

app/code/Magento/GraphQlNewRelic/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"php": "~8.1.0||~8.2.0",
77
"magento/framework": "*",
88
"magento/module-new-relic-reporting": "*",
9-
"magento/module-graphql": "*"
9+
"magento/module-graph-ql": "*"
1010
},
1111
"license": [
1212
"OSL-3.0",

app/code/Magento/GraphQlNewRelic/registration.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
67

78
use Magento\Framework\Component\ComponentRegistrar;
89

0 commit comments

Comments
 (0)