From 33208d40652e8b31d0eaa6bc72f6848cf1518ff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Wed, 21 Feb 2024 16:33:25 +0100 Subject: [PATCH] Drop useless phpdoc, already covered by PHP --- src/LoggerAwareInterface.php | 4 ---- src/LoggerAwareTrait.php | 4 ---- src/LoggerInterface.php | 28 ---------------------- src/LoggerTrait.php | 46 +----------------------------------- src/NullLogger.php | 6 +---- 5 files changed, 2 insertions(+), 86 deletions(-) diff --git a/src/LoggerAwareInterface.php b/src/LoggerAwareInterface.php index cc46a95..0621870 100644 --- a/src/LoggerAwareInterface.php +++ b/src/LoggerAwareInterface.php @@ -9,10 +9,6 @@ interface LoggerAwareInterface { /** * Sets a logger instance on the object. - * - * @param LoggerInterface $logger - * - * @return void */ public function setLogger(LoggerInterface $logger): void; } diff --git a/src/LoggerAwareTrait.php b/src/LoggerAwareTrait.php index 4fb57a2..85104db 100644 --- a/src/LoggerAwareTrait.php +++ b/src/LoggerAwareTrait.php @@ -9,15 +9,11 @@ trait LoggerAwareTrait { /** * The logger instance. - * - * @var LoggerInterface|null */ protected ?LoggerInterface $logger = null; /** * Sets a logger. - * - * @param LoggerInterface $logger */ public function setLogger(LoggerInterface $logger): void { diff --git a/src/LoggerInterface.php b/src/LoggerInterface.php index b3a24b5..8afabc9 100644 --- a/src/LoggerInterface.php +++ b/src/LoggerInterface.php @@ -22,10 +22,7 @@ interface LoggerInterface /** * System is unusable. * - * @param string|\Stringable $message * @param mixed[] $context - * - * @return void */ public function emergency(string|\Stringable $message, array $context = []): void; @@ -35,10 +32,7 @@ public function emergency(string|\Stringable $message, array $context = []): voi * Example: Entire website down, database unavailable, etc. This should * trigger the SMS alerts and wake you up. * - * @param string|\Stringable $message * @param mixed[] $context - * - * @return void */ public function alert(string|\Stringable $message, array $context = []): void; @@ -47,10 +41,7 @@ public function alert(string|\Stringable $message, array $context = []): void; * * Example: Application component unavailable, unexpected exception. * - * @param string|\Stringable $message * @param mixed[] $context - * - * @return void */ public function critical(string|\Stringable $message, array $context = []): void; @@ -58,10 +49,7 @@ public function critical(string|\Stringable $message, array $context = []): void * Runtime errors that do not require immediate action but should typically * be logged and monitored. * - * @param string|\Stringable $message * @param mixed[] $context - * - * @return void */ public function error(string|\Stringable $message, array $context = []): void; @@ -71,20 +59,14 @@ public function error(string|\Stringable $message, array $context = []): void; * Example: Use of deprecated APIs, poor use of an API, undesirable things * that are not necessarily wrong. * - * @param string|\Stringable $message * @param mixed[] $context - * - * @return void */ public function warning(string|\Stringable $message, array $context = []): void; /** * Normal but significant events. * - * @param string|\Stringable $message * @param mixed[] $context - * - * @return void */ public function notice(string|\Stringable $message, array $context = []): void; @@ -93,32 +75,22 @@ public function notice(string|\Stringable $message, array $context = []): void; * * Example: User logs in, SQL logs. * - * @param string|\Stringable $message * @param mixed[] $context - * - * @return void */ public function info(string|\Stringable $message, array $context = []): void; /** * Detailed debug information. * - * @param string|\Stringable $message * @param mixed[] $context - * - * @return void */ public function debug(string|\Stringable $message, array $context = []): void; /** * Logs with an arbitrary level. * - * @param mixed $level - * @param string|\Stringable $message * @param mixed[] $context * - * @return void - * * @throws \Psr\Log\InvalidArgumentException */ public function log($level, string|\Stringable $message, array $context = []): void; diff --git a/src/LoggerTrait.php b/src/LoggerTrait.php index 9c8733f..a5d9980 100644 --- a/src/LoggerTrait.php +++ b/src/LoggerTrait.php @@ -14,11 +14,6 @@ trait LoggerTrait { /** * System is unusable. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void */ public function emergency(string|\Stringable $message, array $context = []): void { @@ -30,11 +25,6 @@ public function emergency(string|\Stringable $message, array $context = []): voi * * Example: Entire website down, database unavailable, etc. This should * trigger the SMS alerts and wake you up. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void */ public function alert(string|\Stringable $message, array $context = []): void { @@ -45,11 +35,6 @@ public function alert(string|\Stringable $message, array $context = []): void * Critical conditions. * * Example: Application component unavailable, unexpected exception. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void */ public function critical(string|\Stringable $message, array $context = []): void { @@ -59,11 +44,6 @@ public function critical(string|\Stringable $message, array $context = []): void /** * Runtime errors that do not require immediate action but should typically * be logged and monitored. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void */ public function error(string|\Stringable $message, array $context = []): void { @@ -75,11 +55,6 @@ public function error(string|\Stringable $message, array $context = []): void * * Example: Use of deprecated APIs, poor use of an API, undesirable things * that are not necessarily wrong. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void */ public function warning(string|\Stringable $message, array $context = []): void { @@ -88,11 +63,6 @@ public function warning(string|\Stringable $message, array $context = []): void /** * Normal but significant events. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void */ public function notice(string|\Stringable $message, array $context = []): void { @@ -103,11 +73,6 @@ public function notice(string|\Stringable $message, array $context = []): void * Interesting events. * * Example: User logs in, SQL logs. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void */ public function info(string|\Stringable $message, array $context = []): void { @@ -116,11 +81,6 @@ public function info(string|\Stringable $message, array $context = []): void /** * Detailed debug information. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void */ public function debug(string|\Stringable $message, array $context = []): void { @@ -130,11 +90,7 @@ public function debug(string|\Stringable $message, array $context = []): void /** * Logs with an arbitrary level. * - * @param mixed $level - * @param string|\Stringable $message - * @param array $context - * - * @return void + * @param mixed $level * * @throws \Psr\Log\InvalidArgumentException */ diff --git a/src/NullLogger.php b/src/NullLogger.php index c1cc3c0..de0561e 100644 --- a/src/NullLogger.php +++ b/src/NullLogger.php @@ -15,11 +15,7 @@ class NullLogger extends AbstractLogger /** * Logs with an arbitrary level. * - * @param mixed $level - * @param string|\Stringable $message - * @param array $context - * - * @return void + * @param mixed[] $context * * @throws \Psr\Log\InvalidArgumentException */