aboutsummaryrefslogtreecommitdiff
path: root/classes/Db_Prefs.php
diff options
context:
space:
mode:
authorwn_ <invalid@email.com>2024-11-23 17:43:24 +0000
committerwn_ <invalid@email.com>2024-11-23 17:43:24 +0000
commitabcd0e8ba205aac8bd9006e99d783afc999af0af (patch)
tree8635fcd5b239f18db5ff831c7ef21a290a8ac6d8 /classes/Db_Prefs.php
parentd4636716fb6e1879098823c2f037db5d8d3f24a0 (diff)
Use native union types in most places.
Diffstat (limited to 'classes/Db_Prefs.php')
-rw-r--r--classes/Db_Prefs.php10
1 files changed, 2 insertions, 8 deletions
diff --git a/classes/Db_Prefs.php b/classes/Db_Prefs.php
index 55be4f6f6..a7ca1bf62 100644
--- a/classes/Db_Prefs.php
+++ b/classes/Db_Prefs.php
@@ -2,17 +2,11 @@
class Db_Prefs {
// this class is a stub for the time being (to be removed)
- /**
- * @return bool|int|null|string
- */
- function read(string $pref_name, ?int $user_id = null, bool $die_on_error = false) {
+ function read(string $pref_name, ?int $user_id = null, bool $die_on_error = false): bool|int|null|string {
return Prefs::get($pref_name, $user_id ?: $_SESSION['uid'], $_SESSION['profile'] ?? null);
}
- /**
- * @param mixed $value
- */
- function write(string $pref_name, $value, ?int $user_id = null, bool $strip_tags = true): bool {
+ function write(string $pref_name, mixed $value, ?int $user_id = null, bool $strip_tags = true): bool {
return Prefs::set($pref_name, $value, $user_id ?: $_SESSION['uid'], $_SESSION['profile'] ?? null, $strip_tags);
}
}