From 587a6ac32e097ff4855174f395a9027c1f2f2b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Sun, 22 Mar 2020 14:05:06 +0100 Subject: [PATCH] Be explicit about mixed context elements If we do not do that, SA tools like PHPStan ask that the type be documented more precisely in implementations. --- Psr/Log/LoggerInterface.php | 38 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Psr/Log/LoggerInterface.php b/Psr/Log/LoggerInterface.php index e695046..2206cfd 100644 --- a/Psr/Log/LoggerInterface.php +++ b/Psr/Log/LoggerInterface.php @@ -22,8 +22,8 @@ interface LoggerInterface /** * System is unusable. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -35,8 +35,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 */ @@ -47,8 +47,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 */ @@ -58,8 +58,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 */ @@ -71,8 +71,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 */ @@ -81,8 +81,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 */ @@ -93,8 +93,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 */ @@ -103,8 +103,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 */ @@ -113,9 +113,9 @@ public function debug($message, array $context = array()); /** * Logs with an arbitrary level. * - * @param mixed $level - * @param string $message - * @param array $context + * @param mixed $level + * @param string $message + * @param mixed[] $context * * @return void *