From 763515de794b4affaf2babcc73008fcf88875c97 Mon Sep 17 00:00:00 2001 From: wn_ Date: Fri, 12 Nov 2021 04:48:06 +0000 Subject: Address PHPStan warnings in 'classes/feeds.php'. Also some minor related tweaks in other classes. --- classes/debug.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'classes/debug.php') diff --git a/classes/debug.php b/classes/debug.php index f7c23cf1c..eca7b31db 100644 --- a/classes/debug.php +++ b/classes/debug.php @@ -5,6 +5,13 @@ class Debug { const LOG_VERBOSE = 1; const LOG_EXTENDED = 2; + const ALL_LOG_LEVELS = [ + Debug::LOG_DISABLED, + Debug::LOG_NORMAL, + Debug::LOG_VERBOSE, + Debug::LOG_EXTENDED, + ]; + /** @deprecated */ public static int $LOG_DISABLED = self::LOG_DISABLED; @@ -43,21 +50,21 @@ class Debug { } /** - * @param Debug::LOG_* $level + * @param int $level Debug::LOG_* */ - public static function set_loglevel($level): void { + public static function set_loglevel(int $level): void { self::$loglevel = $level; } /** - * @return Debug::LOG_* + * @return int Debug::LOG_* */ public static function get_loglevel(): int { return self::$loglevel; } /** - * @param Debug::LOG_* $level + * @param int $level Debug::LOG_* */ public static function log(string $message, int $level = Debug::LOG_NORMAL): bool { -- cgit v1.2.3-54-g00ecf