diff options
| author | 2024-12-28 23:58:00 +0100 | |
|---|---|---|
| committer | 2024-12-28 23:58:00 +0100 | |
| commit | c29cbb7b8be95fee249ed1a21dce98a4772d92e2 (patch) | |
| tree | b116f6033ea081c6cc5f82ce83156f2a7021166c /app/Models/Context.php | |
| parent | 33cdfbb309c61167cf1c81273eb242f94ca8f996 (diff) | |
Fix regressions on some array structures (#7155)
regressions from https://github.com/FreshRSS/FreshRSS/pull/7131
fix https://github.com/FreshRSS/FreshRSS/issues/7154
Diffstat (limited to 'app/Models/Context.php')
| -rw-r--r-- | app/Models/Context.php | 14 |
1 files changed, 5 insertions, 9 deletions
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<FreshRSS_Category> - */ + /** @var array<int,FreshRSS_Category> where the key is the category ID */ private static array $categories = []; - /** - * @var list<FreshRSS_Tag> - */ + /** @var array<int,FreshRSS_Tag> 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<FreshRSS_Category> */ + /** @return array<int,FreshRSS_Category> 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<FreshRSS_Feed> */ + /** @return array<int,FreshRSS_Feed> where the key is the feed ID */ public static function feeds(): array { return FreshRSS_Category::findFeeds(self::categories()); } - /** @return list<FreshRSS_Tag> */ + /** @return array<int,FreshRSS_Tag> where the key is the label ID */ public static function labels(bool $precounts = false): array { if (empty(self::$tags) || $precounts) { $tagDAO = FreshRSS_Factory::createTagDao(); |
