From 6ac5b3c2877c87a25428ded652a9871a7a00d405 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 2 Oct 2024 23:21:58 +0200 Subject: [PATCH] fix(psrlog): Make the logger compatible with the upcoming bump to psr/log 3 in server Signed-off-by: Joas Schilling --- lib/Support/ConsoleLoggerDecorator.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/Support/ConsoleLoggerDecorator.php b/lib/Support/ConsoleLoggerDecorator.php index 7dbc4b71df..fb32027d36 100644 --- a/lib/Support/ConsoleLoggerDecorator.php +++ b/lib/Support/ConsoleLoggerDecorator.php @@ -25,49 +25,49 @@ public function __construct(LoggerInterface $inner, $this->consoleOutput = $consoleOutput; } - public function emergency($message, array $context = []) { + public function emergency($message, array $context = []): void { $this->consoleOutput->writeln("[emergency] $message"); $this->inner->emergency($message, $context); } - public function alert($message, array $context = []) { + public function alert($message, array $context = []): void { $this->consoleOutput->writeln("[alert] $message"); $this->inner->alert($message, $context); } - public function critical($message, array $context = []) { + public function critical($message, array $context = []): void { $this->consoleOutput->writeln("[critical] $message"); $this->inner->critical($message, $context); } - public function error($message, array $context = []) { + public function error($message, array $context = []): void { $this->consoleOutput->writeln("[error] $message"); $this->inner->error($message, $context); } - public function warning($message, array $context = []) { + public function warning($message, array $context = []): void { $this->consoleOutput->writeln("[warning] $message"); $this->inner->warning($message, $context); } - public function notice($message, array $context = []) { + public function notice($message, array $context = []): void { $this->consoleOutput->writeln("[notice] $message"); $this->inner->notice($message, $context); } - public function info($message, array $context = []) { + public function info($message, array $context = []): void { $this->consoleOutput->writeln("[info] $message"); $this->inner->info($message, $context); } - public function debug($message, array $context = []) { + public function debug($message, array $context = []): void { if ($this->consoleOutput->getVerbosity() < OutputInterface::VERBOSITY_DEBUG) { return; } @@ -77,7 +77,7 @@ public function debug($message, array $context = []) { $this->inner->debug($message, $context); } - public function log($level, $message, array $context = []) { + public function log($level, $message, array $context = []): void { $this->consoleOutput->writeln("[log] $message"); $this->inner->log($level, $message, $context);