diff options
| author | 2023-04-07 12:32:10 +0200 | |
|---|---|---|
| committer | 2023-04-07 12:32:10 +0200 | |
| commit | d23d10bcde1a9b86c784d58b891f61e740e0124e (patch) | |
| tree | 6f907e5d13a04832b3350286b1b847fbb3842ee7 /app/Models/View.php | |
| parent | 6c01e4e7d6c177ac345c826059e585bffdd1d517 (diff) | |
Phpstan Level6 for View.php (#5269)
* Remarque's from Alkarex
* indentation
* indentation
* Apply suggestions from code review
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
* 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 <sanchezluc+freshrss@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app/Models/View.php')
| -rw-r--r-- | app/Models/View.php | 80 |
1 files changed, 71 insertions, 9 deletions
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<FreshRSS_Category> */ public $categories; @@ -22,80 +25,115 @@ class FreshRSS_View extends Minz_View { public $feeds; /** @var int */ public $nbUnreadTags; + /** @var array<FreshRSS_Tag> */ public $tags; + /** @var array<int,array{'id':int,'name':string,'id_entry':string,'checked':bool}> */ + public $tagsForEntry; + /** @var array<string,array<string>> */ + public $tagsForEntries; /** @var array<string,string> */ 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<string,string|int|bool> */ public $details; + /** @var bool */ public $disable_aside; + /** @var bool */ public $show_email_field; /** @var string */ public $username; + /** @var array<array{'last_user_activity':int, 'language':string,'enabled':bool,'is_admin':bool, 'enabled':bool, 'article_count':int, 'database_size':int, 'last_user_activity', 'mail_login':string, 'feed_count':int, 'is_default':bool}> */ public $users; // Updates + /** @var string */ public $last_update_time; + /** @var array<string,bool> */ public $status_files; + /** @var array<string,bool> */ public $status_php; + /** @var bool */ public $update_to_apply; + /** @var array<string,bool> */ public $status_database; // Archiving + /** @var int|false */ public $nb_total; + /** @var int */ public $size_total; + /** @var int */ public $size_user; // Display + /** @var array<string> */ public $themes; // Shortcuts + /** @var array<int, string> */ public $list_keys; // User queries - /** - * @var array<int,FreshRSS_UserQuery> - */ + /** @var array<int,FreshRSS_UserQuery> */ public $queries; - /** - * @var FreshRSS_UserQuery|null - */ + /** @var FreshRSS_UserQuery|null */ public $query; // Export / Import + /** @var string */ public $content; + /** @var array<string,array<string>> */ 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<string,string> */ public $message; // Statistics + /** @var float */ public $average; + /** @var float */ public $averageDayOfWeek; + /** @var float */ public $averageHour; + /** @var float */ public $averageMonth; + /** @var array<string> */ public $days; + /** @var array<string,array<int,int|string>> */ public $entryByCategory; + /** @var array<int,int> */ public $entryCount; + /** @var array<string,array<int,int|string>> */ public $feedByCategory; + /** @var array<int, string> */ public $hours24Labels; + /** @var array<string,array<int,array<string,int|string>>> */ public $idleFeeds; + /** @var array<int,string> */ public $last30DaysLabel; + /** @var array<int,string> */ public $last30DaysLabels; + /** @var array<string,string> */ public $months; + /** @var array<string,array<string,int>>|array<string,int> */ public $repartition; + /** @var array<int,int> */ public $repartitionDayOfWeek; + /** @var array<string,int>|array<int,int> */ public $repartitionHour; + /** @var array<int,int> */ public $repartitionMonth; + /** @var array<array<string,int|string>> */ public $topFeed; } |
