From 280f969f3a811c9c1ebd6c337243efa6c6486ed9 Mon Sep 17 00:00:00 2001 From: Denny Septian Panggabean Date: Thu, 6 Oct 2022 21:45:46 +0700 Subject: [PATCH] docs: replace types in Logger tests: increase coverage tests in Logger use dedicated clean_path refactor: implement __toString() in Logger docs: replace param string message to phpdocblock docs: replace param string message to phpdocblock docs: replace types in Logger Co-authored-by: kenjis docs: replace types in Logger docs: replace types in Logger revert refactoring in Logger --- system/Common.php | 2 +- system/Log/Handlers/ChromeLoggerHandler.php | 2 +- system/Log/Logger.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/system/Common.php b/system/Common.php index 70bc6105a39a..8df5ece73f75 100644 --- a/system/Common.php +++ b/system/Common.php @@ -782,7 +782,7 @@ function lang(string $line, array $args = [], ?string $locale = null) * - info * - debug * - * @return mixed + * @return bool */ function log_message(string $level, string $message, array $context = []) { diff --git a/system/Log/Handlers/ChromeLoggerHandler.php b/system/Log/Handlers/ChromeLoggerHandler.php index 2ab019d8f6fc..b2c6d28fdfb4 100644 --- a/system/Log/Handlers/ChromeLoggerHandler.php +++ b/system/Log/Handlers/ChromeLoggerHandler.php @@ -128,7 +128,7 @@ public function handle($level, $message): bool /** * Converts the object to display nicely in the Chrome Logger UI. * - * @param mixed $object + * @param array|int|object|string $object * * @return array */ diff --git a/system/Log/Logger.php b/system/Log/Logger.php index 515a065647ee..1bf578ba1a03 100644 --- a/system/Log/Logger.php +++ b/system/Log/Logger.php @@ -243,7 +243,7 @@ public function debug($message, array $context = []): bool /** * Logs with an arbitrary level. * - * @param mixed $level + * @param string $level * @param string $message */ public function log($level, $message, array $context = []): bool @@ -312,9 +312,9 @@ public function log($level, $message, array $context = []): bool * {file} * {line} * - * @param mixed $message + * @param string $message * - * @return mixed + * @return string */ protected function interpolate($message, array $context = []) {