Reduce undeeded use of elvis operator ?: (#7204)

This commit is contained in:
Alexandre Alapetite
2025-01-10 08:13:09 +01:00
committed by GitHub
parent 3280ec617f
commit 5368f38753
23 changed files with 71 additions and 74 deletions

View File

@@ -114,7 +114,7 @@ class FreshRSS_entry_Controller extends FreshRSS_ActionController {
// so the next unread tag calculation is deferred by passing next_get = 'a' instead of the current get ID.
if ($next_get === 'a' && $is_read) {
$tagDAO = FreshRSS_Factory::createTagDao();
$tagsList = $tagDAO->listTags() ?: [];
$tagsList = $tagDAO->listTags();
$found_tag = false;
foreach ($tagsList as $tag) {
if ($found_tag) {
@@ -174,7 +174,7 @@ class FreshRSS_entry_Controller extends FreshRSS_ActionController {
}
$entryDAO->markRead($ids, $is_read);
$tagDAO = FreshRSS_Factory::createTagDao();
$tagsForEntries = $tagDAO->getTagsForEntries($ids) ?: [];
$tagsForEntries = $tagDAO->getTagsForEntries($ids) ?? [];
$tags = [];
foreach ($tagsForEntries as $line) {
$tags['t_' . $line['id_tag']][] = (string)$line['id_entry'];