Skip to content

Commit

Permalink
Merge pull request #567 from magento-performance/ACPT-1587
Browse files Browse the repository at this point in the history
ACPT-1587:  fixing static test failures for ACPT-1587
  • Loading branch information
JacobBrownAustin authored Oct 3, 2023
2 parents a495fed + 5029ce9 commit eb0d2ed
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
7 changes: 4 additions & 3 deletions app/code/Magento/GraphQlNewRelic/Plugin/ReportError.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ class ReportError
/**
* @param NewRelicWrapper $newRelicWrapper
*/
public function __construct(private NewRelicWrapper $newRelicWrapper) {
public function __construct(private NewRelicWrapper $newRelicWrapper)
{
}

/**
Expand All @@ -31,8 +32,8 @@ public function __construct(private NewRelicWrapper $newRelicWrapper) {
* @return null
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function beforeHandle(ErrorHandler $subject, array $errors, callable $formatter
): null {
public function beforeHandle(ErrorHandler $subject, array $errors, callable $formatter)
{
if (!empty($errors)) {
$this->newRelicWrapper->reportError($errors[0]); // Note: We only log the first error because performance
}
Expand Down
7 changes: 4 additions & 3 deletions app/code/Magento/GraphQlNewRelic/Plugin/ReportException.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class ReportException
/**
* @param NewRelicWrapper $newRelicWrapper
*/
public function __construct(private NewRelicWrapper $newRelicWrapper) {
public function __construct(private NewRelicWrapper $newRelicWrapper)
{
}

/**
Expand All @@ -33,8 +34,8 @@ public function __construct(private NewRelicWrapper $newRelicWrapper) {
public function beforeCheck(
ExceptionFormatter $subject,
\Throwable $exception,
string $internalErrorMessage= null
): null {
string $internalErrorMessage = null
) {
$this->newRelicWrapper->reportError($exception);
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/GraphQlNewRelic/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"php": "~8.1.0||~8.2.0",
"magento/framework": "*",
"magento/module-new-relic-reporting": "*",
"magento/module-graphql": "*"
"magento/module-graph-ql": "*"
},
"license": [
"OSL-3.0",
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/GraphQlNewRelic/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

use Magento\Framework\Component\ComponentRegistrar;

Expand Down

0 comments on commit eb0d2ed

Please sign in to comment.