diff options
author | wn_ <[email protected]> | 2021-11-12 05:24:02 +0000 |
---|---|---|
committer | wn_ <[email protected]> | 2021-11-12 05:24:02 +0000 |
commit | 011c941e7cdfce21d415eb6fa479c411776c79ce (patch) | |
tree | d30a28a84cb23e3c110ae5dfcc704244b57af4f7 /classes/db/prefs.php | |
parent | b0eb347839d3350b57bd614eee67e32a574661d5 (diff) |
Fix some PHPStan warnings in 'classes/db/migrations.php', 'classes/db/prefs.php', and 'classes/debug.php'.
Diffstat (limited to 'classes/db/prefs.php')
-rw-r--r-- | classes/db/prefs.php | 10 |
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); } } |