Tweak to appease PHPStan in 'Pref_Feeds::_makefeedtree()'.

PHPStan flagged the 'count()' below this with: Comparison operation '>' between 0 and 0 is always false.
This commit is contained in:
wn_ 2023-03-05 14:09:20 +00:00
parent c4b16ca608
commit 7ed4fa4c1d
1 changed files with 2 additions and 2 deletions

View File

@ -267,7 +267,7 @@ class Pref_Feeds extends Handler_Protected {
} }
foreach ($feeds_obj->find_many() as $feed) { foreach ($feeds_obj->find_many() as $feed) {
array_push($cat['items'], [ $cat['items'][] = [
'id' => 'FEED:' . $feed->id, 'id' => 'FEED:' . $feed->id,
'bare_id' => (int) $feed->id, 'bare_id' => (int) $feed->id,
'auxcounter' => -1, 'auxcounter' => -1,
@ -279,7 +279,7 @@ class Pref_Feeds extends Handler_Protected {
'unread' => -1, 'unread' => -1,
'type' => 'feed', 'type' => 'feed',
'updates_disabled' => (int)($feed->update_interval < 0), 'updates_disabled' => (int)($feed->update_interval < 0),
]); ];
} }
$cat['param'] = sprintf(_ngettext('(%d feed)', '(%d feeds)', count($cat['items'])), count($cat['items'])); $cat['param'] = sprintf(_ngettext('(%d feed)', '(%d feeds)', count($cat['items'])), count($cat['items']));