diff --git a/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php index ba28c39e09..ff928ccede 100644 --- a/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php @@ -41,7 +41,7 @@ class TestLogger extends Log { //disable original constructor } - public function log($level, string $message, array $context = array()) { + public function log(int $level, string $message, array $context = array()) { $this->level = $level; $this->message = $message; } diff --git a/lib/private/Log.php b/lib/private/Log.php index a18b5db7d0..e47f68807d 100644 --- a/lib/private/Log.php +++ b/lib/private/Log.php @@ -245,12 +245,12 @@ class Log implements ILogger { /** * Logs with an arbitrary level. * - * @param mixed $level + * @param int $level * @param string $message * @param array $context * @return void */ - public function log($level, string $message, array $context = []) { + public function log(int $level, string $message, array $context = []) { $minLevel = min($this->config->getValue('loglevel', Util::WARN), Util::FATAL); $logCondition = $this->config->getValue('log.condition', []); diff --git a/lib/public/ILogger.php b/lib/public/ILogger.php index 9370913a82..b6e945546e 100644 --- a/lib/public/ILogger.php +++ b/lib/public/ILogger.php @@ -120,13 +120,13 @@ interface ILogger { /** * Logs with an arbitrary level. * - * @param mixed $level + * @param int $level * @param string $message * @param array $context * @return mixed * @since 7.0.0 */ - public function log($level, string $message, array $context = []); + public function log(int $level, string $message, array $context = []); /** * Logs an exception very detailed diff --git a/tests/lib/TempManagerTest.php b/tests/lib/TempManagerTest.php index 15b22a7b30..c9e069d9d0 100644 --- a/tests/lib/TempManagerTest.php +++ b/tests/lib/TempManagerTest.php @@ -17,7 +17,7 @@ class NullLogger extends Log { //disable original constructor } - public function log($level, string $message, array $context = array()) { + public function log(int $level, string $message, array $context = array()) { //noop } }