From bd9fa803f1f0c23face77fa1bc550d1198ce5ad6 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 2 May 2023 14:38:32 +0200 Subject: 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> --- cli/user-info.php | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'cli') 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'], -- cgit v1.2.3