Skip to content

Commit

Permalink
Fix Psalm issues
Browse files Browse the repository at this point in the history
  • Loading branch information
msmakouz committed Jan 2, 2024
1 parent 749136c commit 81450a3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Logger/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ public function handle(array|LogRecord $record): bool

protected function write(array|LogRecord $record): void
{
/** @psalm-suppress InvalidArgument */
$message = $record['formatted'];
\assert(\is_string($message) || $message instanceof \Stringable);

$level = $record['level'] instanceof Level ? $record['level']->value : $record['level'];

/** @psalm-suppress DeprecatedConstant */
match ($level) {
Logger::ERROR, Logger::CRITICAL => $this->logger->error($message),
Logger::WARNING, Logger::ALERT, Logger::EMERGENCY => $this->logger->warning($message),
Expand Down

0 comments on commit 81450a3

Please sign in to comment.