diff options
| author | 2023-05-02 14:38:32 +0200 | |
|---|---|---|
| committer | 2023-05-02 14:38:32 +0200 | |
| commit | bd9fa803f1f0c23face77fa1bc550d1198ce5ad6 (patch) | |
| tree | edba662e84e70a6b0f23c8379d4ef174f714e999 /cli/user-info.php | |
| parent | 4de1d5efea128e6cc70c71bad9be28d01e851f81 (diff) | |
PHPStan Level 7 complete DAOs (#5354)
* PHPStan Level 7 complete DAOs
* Finalise PHPStan Level 7 for CategoryDAO
* PHPStan Level 7 for Context and Search
* Apply suggestions from code review
Co-authored-by: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com>
Diffstat (limited to 'cli/user-info.php')
| -rwxr-xr-x | cli/user-info.php | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/cli/user-info.php b/cli/user-info.php index d8b498cc3..a320a4d19 100755 --- a/cli/user-info.php +++ b/cli/user-info.php @@ -63,22 +63,8 @@ foreach ($users as $username) { $nbEntries = $entryDAO->countUnreadRead(); $nbFavorites = $entryDAO->countUnreadReadFavorites(); - - if ($nbFavorites === false) { - $nbFavorites = [ - 'all' => -1, - ]; - } - $feedList = $feedDAO->listFeedsIds(); - if ($nbEntries === false) { - $nbEntries = [ - 'read' => -1, - 'unread' => -1, - ]; - } - $data = array( 'default' => $username === FreshRSS_Context::$system_conf->default_user ? '*' : '', 'user' => $username, @@ -87,7 +73,7 @@ foreach ($users as $username) { 'last_user_activity' => FreshRSS_UserDAO::mtime($username), 'database_size' => $databaseDAO->size(), 'categories' => $catDAO->count(), - 'feeds' => count($feedList === false ? [] : $feedList), + 'feeds' => count($feedList), 'reads' => (int)$nbEntries['read'], 'unreads' => (int)$nbEntries['unread'], 'favourites' => (int)$nbFavorites['all'], |
