summaryrefslogtreecommitdiff
path: root/classes/db/prefs.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-11-18 07:32:28 +0300
committerAndrew Dolgov <[email protected]>2021-11-18 07:32:28 +0300
commit63ec5a89657bb7f9650582b96e0bb255a0889b48 (patch)
tree074b61eedd7304ba1d8d7deec01d26973ef8e6b8 /classes/db/prefs.php
parent3a3fde1a2e0beac6d179c6449eaad726100710d7 (diff)
parent2d830c6281c19a7ee29cd379f5aedc82deef3775 (diff)
Merge branch 'wip-phpstan-level6'
Diffstat (limited to 'classes/db/prefs.php')
-rw-r--r--classes/db/prefs.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/classes/db/prefs.php b/classes/db/prefs.php
index 821216622..209ef58c1 100644
--- a/classes/db/prefs.php
+++ b/classes/db/prefs.php
@@ -2,11 +2,17 @@
class Db_Prefs {
// this class is a stub for the time being (to be removed)
- function read($pref_name, $user_id = false, $die_on_error = false) {
+ /**
+ * @return bool|int|null|string
+ */
+ function read(string $pref_name, ?int $user_id = null, bool $die_on_error = false) {
return get_pref($pref_name, $user_id);
}
- function write($pref_name, $value, $user_id = false, $strip_tags = true) {
+ /**
+ * @param mixed $value
+ */
+ function write(string $pref_name, $value, ?int $user_id = null, bool $strip_tags = true): bool {
return set_pref($pref_name, $value, $user_id, $strip_tags);
}
}