From 1ec9f7ab901f3df28765135a39db0ba4c0477374 Mon Sep 17 00:00:00 2001 From: Anton Vasiliev Date: Sun, 2 May 2021 10:56:54 +0100 Subject: [PATCH 1/3] Clarify type of 2nd argument `context` --- Psr/Log/LoggerInterface.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Psr/Log/LoggerInterface.php b/Psr/Log/LoggerInterface.php index 2206cfd..8293266 100644 --- a/Psr/Log/LoggerInterface.php +++ b/Psr/Log/LoggerInterface.php @@ -23,7 +23,7 @@ interface LoggerInterface * System is unusable. * * @param string $message - * @param mixed[] $context + * @param array $context * * @return void */ @@ -36,7 +36,7 @@ public function emergency($message, array $context = array()); * trigger the SMS alerts and wake you up. * * @param string $message - * @param mixed[] $context + * @param array $context * * @return void */ @@ -48,7 +48,7 @@ public function alert($message, array $context = array()); * Example: Application component unavailable, unexpected exception. * * @param string $message - * @param mixed[] $context + * @param array $context * * @return void */ @@ -59,7 +59,7 @@ public function critical($message, array $context = array()); * be logged and monitored. * * @param string $message - * @param mixed[] $context + * @param array $context * * @return void */ @@ -72,7 +72,7 @@ public function error($message, array $context = array()); * that are not necessarily wrong. * * @param string $message - * @param mixed[] $context + * @param array $context * * @return void */ @@ -82,7 +82,7 @@ public function warning($message, array $context = array()); * Normal but significant events. * * @param string $message - * @param mixed[] $context + * @param array $context * * @return void */ @@ -94,7 +94,7 @@ public function notice($message, array $context = array()); * Example: User logs in, SQL logs. * * @param string $message - * @param mixed[] $context + * @param array $context * * @return void */ @@ -104,7 +104,7 @@ public function info($message, array $context = array()); * Detailed debug information. * * @param string $message - * @param mixed[] $context + * @param array $context * * @return void */ @@ -115,7 +115,7 @@ public function debug($message, array $context = array()); * * @param mixed $level * @param string $message - * @param mixed[] $context + * @param array $context * * @return void * From 461c57903fc780a57db4b41620bdcc31ceaf86c2 Mon Sep 17 00:00:00 2001 From: Anton Vasiliev Date: Mon, 3 May 2021 09:25:57 +0100 Subject: [PATCH 2/3] Revert "Clarify type of 2nd argument `context`" This reverts commit 1ec9f7ab --- Psr/Log/LoggerInterface.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Psr/Log/LoggerInterface.php b/Psr/Log/LoggerInterface.php index 8293266..2206cfd 100644 --- a/Psr/Log/LoggerInterface.php +++ b/Psr/Log/LoggerInterface.php @@ -23,7 +23,7 @@ interface LoggerInterface * System is unusable. * * @param string $message - * @param array $context + * @param mixed[] $context * * @return void */ @@ -36,7 +36,7 @@ public function emergency($message, array $context = array()); * trigger the SMS alerts and wake you up. * * @param string $message - * @param array $context + * @param mixed[] $context * * @return void */ @@ -48,7 +48,7 @@ public function alert($message, array $context = array()); * Example: Application component unavailable, unexpected exception. * * @param string $message - * @param array $context + * @param mixed[] $context * * @return void */ @@ -59,7 +59,7 @@ public function critical($message, array $context = array()); * be logged and monitored. * * @param string $message - * @param array $context + * @param mixed[] $context * * @return void */ @@ -72,7 +72,7 @@ public function error($message, array $context = array()); * that are not necessarily wrong. * * @param string $message - * @param array $context + * @param mixed[] $context * * @return void */ @@ -82,7 +82,7 @@ public function warning($message, array $context = array()); * Normal but significant events. * * @param string $message - * @param array $context + * @param mixed[] $context * * @return void */ @@ -94,7 +94,7 @@ public function notice($message, array $context = array()); * Example: User logs in, SQL logs. * * @param string $message - * @param array $context + * @param mixed[] $context * * @return void */ @@ -104,7 +104,7 @@ public function info($message, array $context = array()); * Detailed debug information. * * @param string $message - * @param array $context + * @param mixed[] $context * * @return void */ @@ -115,7 +115,7 @@ public function debug($message, array $context = array()); * * @param mixed $level * @param string $message - * @param array $context + * @param mixed[] $context * * @return void * From 732030c42f8ee70900034a9e195a8e8b8f37a7e7 Mon Sep 17 00:00:00 2001 From: Anton Vasiliev Date: Mon, 3 May 2021 09:31:33 +0100 Subject: [PATCH 3/3] Make type of 2nd argument `context` compliant with LoggerInterface --- Psr/Log/AbstractLogger.php | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Psr/Log/AbstractLogger.php b/Psr/Log/AbstractLogger.php index 90e721a..e02f9da 100644 --- a/Psr/Log/AbstractLogger.php +++ b/Psr/Log/AbstractLogger.php @@ -14,8 +14,8 @@ abstract class AbstractLogger implements LoggerInterface /** * System is unusable. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -30,8 +30,8 @@ public function emergency($message, array $context = array()) * Example: Entire website down, database unavailable, etc. This should * trigger the SMS alerts and wake you up. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -45,8 +45,8 @@ public function alert($message, array $context = array()) * * Example: Application component unavailable, unexpected exception. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -59,8 +59,8 @@ public function critical($message, array $context = array()) * Runtime errors that do not require immediate action but should typically * be logged and monitored. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -75,8 +75,8 @@ public function error($message, array $context = array()) * Example: Use of deprecated APIs, poor use of an API, undesirable things * that are not necessarily wrong. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -88,8 +88,8 @@ public function warning($message, array $context = array()) /** * Normal but significant events. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -103,8 +103,8 @@ public function notice($message, array $context = array()) * * Example: User logs in, SQL logs. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -116,8 +116,8 @@ public function info($message, array $context = array()) /** * Detailed debug information. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */