From d8c535c25c2330f9c2b7ee19d74b6d2b4a3bf4b6 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 13 May 2023 22:47:51 +0200 Subject: PHPStan Level 7 for Share userController logs_pagination (#5393) --- app/Models/FeedDAO.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'app/Models/FeedDAO.php') diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php index 67543b597..ec51486a6 100644 --- a/app/Models/FeedDAO.php +++ b/app/Models/FeedDAO.php @@ -640,14 +640,11 @@ SQL; } } - /** - * @return int|false - */ - public function count() { + public function count(): int { $sql = 'SELECT COUNT(e.id) AS count FROM `_feed` e'; $stm = $this->pdo->query($sql); if ($stm == false) { - return false; + return -1; } $res = $stm->fetchAll(PDO::FETCH_COLUMN, 0); return isset($res[0]) ? $res[0] : 0; -- cgit v1.2.3