diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2024-03-26 17:11:56 +0000 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2024-03-26 17:11:56 +0000 |
| commit | 435c321caaf3ae7aca936f175348d9efb40d6419 (patch) | |
| tree | d64d45215fa331dca8c489e9b9fbbc9e04cb5eda /classes/Counters.php | |
| parent | fea3089bde5b4abfdcc8b5a0314a7f82fcf25bea (diff) | |
| parent | de00a095387499cdb5c8eb9c0ab721d67bd0b3fa (diff) | |
Merge branch 'feature/php84-explicit-nullable-params' into 'master'
Make implicitly nullable parameters explicitly nullable.
See merge request tt-rss/tt-rss!26
Diffstat (limited to 'classes/Counters.php')
| -rw-r--r-- | classes/Counters.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/classes/Counters.php b/classes/Counters.php index 948e6ee1d..b3cba162c 100644 --- a/classes/Counters.php +++ b/classes/Counters.php @@ -15,11 +15,11 @@ class Counters { } /** - * @param array<int> $feed_ids - * @param array<int> $label_ids + * @param array<int>|null $feed_ids + * @param array<int>|null $label_ids * @return array<int, array<string, int|string>> */ - static function get_conditional(array $feed_ids = null, array $label_ids = null): array { + static function get_conditional(?array $feed_ids = null, ?array $label_ids = null): array { return [ ...self::get_global(), ...self::get_virt(), @@ -52,10 +52,10 @@ class Counters { } /** - * @param array<int> $cat_ids + * @param array<int>|null $cat_ids * @return array<int, array<string, int|string>> */ - private static function get_cats(array $cat_ids = null): array { + private static function get_cats(?array $cat_ids = null): array { $ret = []; /* Labels category */ @@ -141,10 +141,10 @@ class Counters { } /** - * @param array<int> $feed_ids + * @param array<int>|null $feed_ids * @return array<int, array<string, int|string>> */ - private static function get_feeds(array $feed_ids = null): array { + private static function get_feeds(?array $feed_ids = null): array { $span = Tracer::start(__METHOD__); $ret = []; @@ -300,10 +300,10 @@ class Counters { } /** - * @param array<int> $label_ids + * @param array<int>|null $label_ids * @return array<int, array<string, int|string>> */ - static function get_labels(array $label_ids = null): array { + static function get_labels(?array $label_ids = null): array { $span = Tracer::start(__METHOD__); $ret = []; |