From a80a5f48a16e7d232168a7aaa68e9a1804235ce1 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 18 Dec 2023 17:59:16 +0100 Subject: Pass PHPStan level 8 (#5946) * Pass PHPStan level 8 And prepare for PHPStan level 9 https://phpstan.org/user-guide/rule-levels * Revert wrong replace in comment * Fix PHPStan level 8 * Update PHPStan and other dev dependencies * Remove obsolete comment * noVariableVariables and towards bleedingEdge https://github.com/phpstan/phpstan-strict-rules https://phpstan.org/blog/what-is-bleeding-edge * More bleedingEdge * A bit more PHPStan level 9 * More PHPStan level 9 * Prepare for booleansInConditions Ignore int and null * Revert wrong line * More fixes * Fix keep_max_n_unread * Stricter attribute functions * Stricter callHooks and more PHPStan level 9 * More typing * A tiny more --- app/views/configure/display.phtml | 94 +++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 47 deletions(-) (limited to 'app/views/configure/display.phtml') diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml index b48dcbf71..d373c0bb5 100644 --- a/app/views/configure/display.phtml +++ b/app/views/configure/display.phtml @@ -16,10 +16,10 @@
- - +
@@ -28,15 +28,15 @@
- timezone, $timezones, true)) { - FreshRSS_Context::$user_conf->timezone = ''; + if (!in_array(FreshRSS_Context::userConf()->timezone, $timezones, true)) { + FreshRSS_Context::userConf()->timezone = ''; } ?> - @@ -49,16 +49,16 @@
    themes); $i = 1; $themeAvailable = false; ?> - themes as $theme) { ?> - theme === $theme['id']) { + themes as $theme) { ?> + theme === $theme['id']) { $checked = 'checked="checked"'; $themeAvailable = true; } else { $checked = ''; } ?> value="" - data-leave-validation="theme === $theme['id']) ? 1 : 0 ?>" /> + data-leave-validation="theme === $theme['id']) ? 1 : 0 ?>" />
  • @@ -98,7 +98,7 @@
    -
    theme)?>
    +
    theme)?>
  • @@ -109,14 +109,14 @@
    - + +
    - content_width; ?> + content_width; ?>
    @@ -137,7 +137,7 @@
    - topline_website; ?> + topline_website; ?>
    @@ -158,7 +158,7 @@
    - topline_thumbnail; ?> + topline_thumbnail; ?>
    @@ -201,50 +201,50 @@ topline_read ? ' checked="checked"' : '' ?> - data-leave-validation="topline_read ?>" /> + FreshRSS_Context::userConf()->topline_read ? ' checked="checked"' : '' ?> + data-leave-validation="topline_read ?>" /> topline_favorite ? ' checked="checked"' : '' ?> - data-leave-validation="topline_favorite ?>" /> + FreshRSS_Context::userConf()->topline_favorite ? ' checked="checked"' : '' ?> + data-leave-validation="topline_favorite ?>" /> topline_summary ? 'checked="checked"' : '' ?> - data-leave-validation="topline_summary ?>" /> + FreshRSS_Context::userConf()->topline_summary ? 'checked="checked"' : '' ?> + data-leave-validation="topline_summary ?>" /> topline_display_authors ? ' checked="checked"' : '' ?> - data-leave-validation="topline_display_authors ?>" /> + FreshRSS_Context::userConf()->topline_display_authors ? ' checked="checked"' : '' ?> + data-leave-validation="topline_display_authors ?>" /> topline_date ? ' checked="checked"' : '' ?> - data-leave-validation="topline_date ?>" /> - topline_link ? ' checked="checked"' : '' ?> - data-leave-validation="topline_link ?>" /> + FreshRSS_Context::userConf()->topline_date ? ' checked="checked"' : '' ?> + data-leave-validation="topline_date ?>" /> + topline_link ? ' checked="checked"' : '' ?> + data-leave-validation="topline_link ?>" /> bottomline_read ? ' checked="checked"' : '' ?> - data-leave-validation="bottomline_read ?>" /> + FreshRSS_Context::userConf()->bottomline_read ? ' checked="checked"' : '' ?> + data-leave-validation="bottomline_read ?>" /> bottomline_favorite ? ' checked="checked"' : '' ?> - data-leave-validation="bottomline_favorite ?>" /> + FreshRSS_Context::userConf()->bottomline_favorite ? ' checked="checked"' : '' ?> + data-leave-validation="bottomline_favorite ?>" /> bottomline_myLabels ? ' checked="checked"' : '' ?> - data-leave-validation="bottomline_myLabels ?>" /> + FreshRSS_Context::userConf()->bottomline_myLabels ? ' checked="checked"' : '' ?> + data-leave-validation="bottomline_myLabels ?>" /> bottomline_tags ? ' checked="checked"' : '' ?> - data-leave-validation="bottomline_tags ?>" /> + FreshRSS_Context::userConf()->bottomline_tags ? ' checked="checked"' : '' ?> + data-leave-validation="bottomline_tags ?>" /> bottomline_sharing ? ' checked="checked"' : '' ?> - data-leave-validation="bottomline_sharing ?>" /> + FreshRSS_Context::userConf()->bottomline_sharing ? ' checked="checked"' : '' ?> + data-leave-validation="bottomline_sharing ?>" /> bottomline_date ? ' checked="checked"' : '' ?> - data-leave-validation="bottomline_date ?>" /> + FreshRSS_Context::userConf()->bottomline_date ? ' checked="checked"' : '' ?> + data-leave-validation="bottomline_date ?>" /> bottomline_link ? ' checked="checked"' : '' ?> - data-leave-validation="bottomline_link ?>" /> + FreshRSS_Context::userConf()->bottomline_link ? ' checked="checked"' : '' ?> + data-leave-validation="bottomline_link ?>" /> @@ -255,8 +255,8 @@
    + FreshRSS_Context::userConf()->html5_notif_timeout ?>" + data-leave-validation="html5_notif_timeout ?>" />
    @@ -264,8 +264,8 @@
    -- cgit v1.2.3