From c29cbb7b8be95fee249ed1a21dce98a4772d92e2 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 28 Dec 2024 23:58:00 +0100 Subject: Fix regressions on some array structures (#7155) regressions from https://github.com/FreshRSS/FreshRSS/pull/7131 fix https://github.com/FreshRSS/FreshRSS/issues/7154 --- app/Models/Context.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'app/Models/Context.php') diff --git a/app/Models/Context.php b/app/Models/Context.php index c467ed04f..6634482d3 100644 --- a/app/Models/Context.php +++ b/app/Models/Context.php @@ -7,13 +7,9 @@ declare(strict_types=1); */ final class FreshRSS_Context { - /** - * @var list - */ + /** @var array where the key is the category ID */ private static array $categories = []; - /** - * @var list - */ + /** @var array where the key is the label ID */ private static array $tags = []; public static string $name = ''; public static string $description = ''; @@ -176,7 +172,7 @@ final class FreshRSS_Context { FreshRSS_Context::$user_conf = null; } - /** @return list */ + /** @return array where the key is the category ID */ public static function categories(): array { if (empty(self::$categories)) { $catDAO = FreshRSS_Factory::createCategoryDao(); @@ -185,12 +181,12 @@ final class FreshRSS_Context { return self::$categories; } - /** @return list */ + /** @return array where the key is the feed ID */ public static function feeds(): array { return FreshRSS_Category::findFeeds(self::categories()); } - /** @return list */ + /** @return array where the key is the label ID */ public static function labels(bool $precounts = false): array { if (empty(self::$tags) || $precounts) { $tagDAO = FreshRSS_Factory::createTagDao(); -- cgit v1.2.3