From 7ed4fa4c1dbdd9df552cf6dd28907c6769911a0e Mon Sep 17 00:00:00 2001 From: wn_ Date: Sun, 5 Mar 2023 14:09:20 +0000 Subject: Tweak to appease PHPStan in 'Pref_Feeds::_makefeedtree()'. PHPStan flagged the 'count()' below this with: Comparison operation '>' between 0 and 0 is always false. --- classes/pref/feeds.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes/pref/feeds.php') diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index 679eb12e9..d8b2ba01a 100755 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -267,7 +267,7 @@ class Pref_Feeds extends Handler_Protected { } foreach ($feeds_obj->find_many() as $feed) { - array_push($cat['items'], [ + $cat['items'][] = [ 'id' => 'FEED:' . $feed->id, 'bare_id' => (int) $feed->id, 'auxcounter' => -1, @@ -279,7 +279,7 @@ class Pref_Feeds extends Handler_Protected { 'unread' => -1, 'type' => 'feed', 'updates_disabled' => (int)($feed->update_interval < 0), - ]); + ]; } $cat['param'] = sprintf(_ngettext('(%d feed)', '(%d feeds)', count($cat['items'])), count($cat['items'])); -- cgit v1.2.3