From f558c6a379cc13ecb097d20d435acfcb5412d88c Mon Sep 17 00:00:00 2001 From: Fritz Michael Gschwantner Date: Fri, 4 Oct 2024 10:33:10 +0200 Subject: [PATCH] fix return types --- src/EventListener/NewsListener.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/EventListener/NewsListener.php b/src/EventListener/NewsListener.php index 43552a8..5986007 100644 --- a/src/EventListener/NewsListener.php +++ b/src/EventListener/NewsListener.php @@ -29,7 +29,7 @@ public function __construct(private readonly NewsCriteriaBuilder $searchBuilder) } #[AsHook('newsListCountItems')] - public function onNewsListCountItems(array $archives, bool|null $featured, ModuleNewsList $module): int + public function onNewsListCountItems(array $archives, bool|null $featured, ModuleNewsList $module): int|false { try { if (null === ($criteria = $this->getCriteria($archives, $featured, $module))) { @@ -43,10 +43,10 @@ public function onNewsListCountItems(array $archives, bool|null $featured, Modul } /** - * @return Collection|null + * @return Collection|null|false */ #[AsHook('newsListFetchItems')] - public function onNewsListFetchItems(array $archives, bool|null $featured, int $limit, int $offset, ModuleNewsList $module): Collection|null + public function onNewsListFetchItems(array $archives, bool|null $featured, int $limit, int $offset, ModuleNewsList $module): Collection|null|false { try { if (null === ($criteria = $this->getCriteria($archives, $featured, $module))) {