From d23d10bcde1a9b86c784d58b891f61e740e0124e Mon Sep 17 00:00:00 2001 From: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> Date: Fri, 7 Apr 2023 12:32:10 +0200 Subject: Phpstan Level6 for View.php (#5269) * Remarque's from Alkarex * indentation * indentation * Apply suggestions from code review Co-authored-by: Alexandre Alapetite * Remarque's from Alkarex * A few improvements * Remarque's from Alkarex * Remarque's from Alkarex * Remarque's from Alkarex * Remarque's from Alkarex * Fixes and improvments * Fix getTagsForEntry --------- Co-authored-by: Luc Co-authored-by: Alexandre Alapetite --- app/Models/View.php | 80 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 71 insertions(+), 9 deletions(-) (limited to 'app/Models/View.php') diff --git a/app/Models/View.php b/app/Models/View.php index 7e7afd124..28e6dbb35 100644 --- a/app/Models/View.php +++ b/app/Models/View.php @@ -3,8 +3,11 @@ class FreshRSS_View extends Minz_View { // Main views + /** @var callable */ public $callbackBeforeEntries; + /** @var callable|null */ public $callbackBeforeFeeds; + /** @var callable */ public $callbackBeforePagination; /** @var array */ public $categories; @@ -22,80 +25,115 @@ class FreshRSS_View extends Minz_View { public $feeds; /** @var int */ public $nbUnreadTags; + /** @var array */ public $tags; + /** @var array */ + public $tagsForEntry; + /** @var array> */ + public $tagsForEntries; /** @var array */ public $notification; /** @var bool */ public $excludeMutedFeeds; // Substriptions + /** @var FreshRSS_Category|null */ public $default_category; + /** @var bool */ public $displaySlider; + /** @var bool */ public $load_ok; + /** @var bool */ public $onlyFeedsWithError; + /** @var bool */ public $signalError; // Manage users + /** @var array */ public $details; + /** @var bool */ public $disable_aside; + /** @var bool */ public $show_email_field; /** @var string */ public $username; + /** @var array */ public $users; // Updates + /** @var string */ public $last_update_time; + /** @var array */ public $status_files; + /** @var array */ public $status_php; + /** @var bool */ public $update_to_apply; + /** @var array */ public $status_database; // Archiving + /** @var int|false */ public $nb_total; + /** @var int */ public $size_total; + /** @var int */ public $size_user; // Display + /** @var array */ public $themes; // Shortcuts + /** @var array */ public $list_keys; // User queries - /** - * @var array - */ + /** @var array */ public $queries; - /** - * @var FreshRSS_UserQuery|null - */ + /** @var FreshRSS_UserQuery|null */ public $query; // Export / Import + /** @var string */ public $content; + /** @var array> */ public $entryIdsTagNames; + /** @var string */ public $list_title; + /** @var int */ public $queryId; + /** @var string */ public $type; // Form login + /** @var int */ public $cookie_days; + /** @var string */ public $nonce; + /** @var string */ public $salt1; // Registration + /** @var bool */ public $can_register; + /** @var string */ public $preferred_language; + /** @var bool */ public $show_tos_checkbox; + /** @var string */ public $terms_of_service; - - // Email validation + /** @var string */ public $site_title; + /** @var string */ public $validation_url; // Logs + /** @var int */ public $currentPage; + /** @var Minz_Paginator */ public $logsPaginator; + /** @var int */ public $nbPage; // RSS view @@ -105,12 +143,15 @@ class FreshRSS_View extends Minz_View { public $rss_url = ''; /** @var string */ public $rss_base = ''; - /** @var boolean */ + /** @var bool */ public $internal_rendering = false; // Content preview + /** @var string */ public $fatalError; + /** @var string */ public $htmlContent; + /** @var bool */ public $selectorSuccess; // Extensions @@ -126,28 +167,49 @@ class FreshRSS_View extends Minz_View { public $extensions_installed; // Errors + /** @var string */ public $code; + /** @var string */ public $errorMessage; + /** @var array */ public $message; // Statistics + /** @var float */ public $average; + /** @var float */ public $averageDayOfWeek; + /** @var float */ public $averageHour; + /** @var float */ public $averageMonth; + /** @var array */ public $days; + /** @var array> */ public $entryByCategory; + /** @var array */ public $entryCount; + /** @var array> */ public $feedByCategory; + /** @var array */ public $hours24Labels; + /** @var array>> */ public $idleFeeds; + /** @var array */ public $last30DaysLabel; + /** @var array */ public $last30DaysLabels; + /** @var array */ public $months; + /** @var array>|array */ public $repartition; + /** @var array */ public $repartitionDayOfWeek; + /** @var array|array */ public $repartitionHour; + /** @var array */ public $repartitionMonth; + /** @var array> */ public $topFeed; } -- cgit v1.2.3