1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-01-04 16:29:15 +00:00

Fix some PHPStan warnings in 'classes/db/migrations.php', 'classes/db/prefs.php', and 'classes/debug.php'.

This commit is contained in:
wn_
2021-11-12 05:24:02 +00:00
parent b0eb347839
commit 011c941e7c
3 changed files with 32 additions and 17 deletions

View File

@@ -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);
}
}