Skip to content

Commit

Permalink
Fix style for LoggingTrait
Browse files Browse the repository at this point in the history
  • Loading branch information
Hectorhammett committed Sep 25, 2024
1 parent 566c414 commit 8bb61a1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Logging/LoggingTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private function logRequest(LogEvent $event): void
'requestId' => $event->requestId ?? null,
];

$debugEvent = array_filter($debugEvent, fn($value) => !is_null($value));
$debugEvent = array_filter($debugEvent, fn ($value) => !is_null($value));

$jsonPayload = [
'request.method' => $event->method,
Expand All @@ -41,7 +41,7 @@ private function logRequest(LogEvent $event): void
'retryAttempt' => $event->retryAttempt
];

$debugEvent['jsonPayload'] = array_filter($jsonPayload, fn($value) => !is_null($value));
$debugEvent['jsonPayload'] = array_filter($jsonPayload, fn ($value) => !is_null($value));

$this->logger->debug((string) json_encode($debugEvent));
}
Expand All @@ -60,10 +60,10 @@ private function logResponse(LogEvent $event): void
]
];

$debugEvent = array_filter($debugEvent, fn($value) => !is_null($value));
$debugEvent = array_filter($debugEvent, fn ($value) => !is_null($value));
$debugEvent['jsonPayload'] = array_filter(
$debugEvent['jsonPayload'],
fn($value) => !is_null($value)
fn ($value) => !is_null($value)
);
$this->logger->debug((string) json_encode($debugEvent));

Expand All @@ -77,10 +77,10 @@ private function logResponse(LogEvent $event): void
]
];

$infoEvent = array_filter($infoEvent, fn($value) => !is_null($value));
$infoEvent = array_filter($infoEvent, fn ($value) => !is_null($value));
$infoEvent['jsonPayload'] = array_filter(
$infoEvent['jsonPayload'],
fn($value) => !is_null($value)
fn ($value) => !is_null($value)
);

$this->logger->info((string) json_encode($infoEvent));
Expand All @@ -101,10 +101,10 @@ private function logStatus(LogEvent $event): void
]
];

$infoEvent = array_filter($infoEvent, fn($value) => !is_null($value));
$infoEvent = array_filter($infoEvent, fn ($value) => !is_null($value));
$infoEvent['jsonPayload'] = array_filter(
$infoEvent['jsonPayload'],
fn($value) => !is_null($value)
fn ($value) => !is_null($value)
);

$this->logger->info((string) json_encode($infoEvent));
Expand Down

0 comments on commit 8bb61a1

Please sign in to comment.