summaryrefslogtreecommitdiff
path: root/classes/debug.php
diff options
context:
space:
mode:
authorwn_ <[email protected]>2021-11-12 04:48:06 +0000
committerwn_ <[email protected]>2021-11-12 04:48:06 +0000
commit763515de794b4affaf2babcc73008fcf88875c97 (patch)
treeda6c3cf8e30a613afc62f72d2680f22611c684e5 /classes/debug.php
parent5606e38bff619c388c9621dde30f0d54127a21f4 (diff)
Address PHPStan warnings in 'classes/feeds.php'.
Also some minor related tweaks in other classes.
Diffstat (limited to 'classes/debug.php')
-rw-r--r--classes/debug.php15
1 files changed, 11 insertions, 4 deletions
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 {