Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phpstan Level6 for View.php #5269

Merged
merged 14 commits into from
Apr 7, 2023
16 changes: 8 additions & 8 deletions app/Models/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Main views
/** @var callable */
public $callbackBeforeEntries;
/** @var callable */
/** @var callable|null */
public $callbackBeforeFeeds;
/** @var callable */
public $callbackBeforePagination;
Expand All @@ -25,7 +25,7 @@
public $feeds;
/** @var int */
public $nbUnreadTags;
/** @var array<string, array<int, mixed>> */
/** @var array<string, array<int, mixed>>|array<FreshRSS_Tag> */
public $tags;
/** @var array<string,string> */
public $notification;
Expand All @@ -45,15 +45,15 @@
public $signalError;

// Manage users
/** @var array<string> */
/** @var array<string|float|int> */
public $details;
/** @var bool */
public $disable_aside;
/** @var bool */
public $show_email_field;
/** @var string */
public $username;
/** @var array<string> */
/** @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
Expand All @@ -77,8 +77,8 @@
public $size_user;

// Display
/** @var string */
/** @var array */
public $themes;

Check failure on line 81 in app/Models/View.php

View workflow job for this annotation

GitHub Actions / tests

Property FreshRSS_View::$themes type has no value type specified in iterable type array.

// Shortcuts
/** @var array<string> */
Expand All @@ -91,7 +91,7 @@
public $query;

// Export / Import
/** @var array<string,array<string,string>> */
/** @var string */
public $content;
/** @var array<string> */
public $entryIdsTagNames;
Expand Down Expand Up @@ -197,11 +197,11 @@
public $last30DaysLabels;
/** @var array<string,string> */
public $months;
/** @var array<string, array<string, int>> */
/** @var array<string, array<string, int>>|array<string, int> */
public $repartition;
/** @var array<int,int> */
public $repartitionDayOfWeek;
/** @var array<string, int> */
/** @var array<string, int>|array<int, int> */
public $repartitionHour;
/** @var array<int,int> */
public $repartitionMonth;
Expand Down
4 changes: 2 additions & 2 deletions app/views/index/logs.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
?>

<?php if (!empty($items)) { ?>
<?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?>
<?php $this->logsPaginator->render('logs_pagination.phtml', 0); ?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was wrong, breaking the pagination. Fixed in #5403

<div id="loglist-wrapper" class="table-wrapper">
<table id="loglist">
<thead>
Expand All @@ -41,7 +41,7 @@
</tbody>
</table>
</div>
<?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?>
<?php $this->logsPaginator->render('logs_pagination.phtml', 0); ?>



Expand Down