From 288ed04ccc30b58373576dc3be811aee43e67034 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 31 Mar 2023 08:23:39 +0200 Subject: PHPStan level 6 for all PDO and Exception classes (#5239) * PHPStan level 6 for all PDO and Exception classes Contributes to https://github.com/FreshRSS/FreshRSS/issues/4112 * Fix type * Now also our remaining own librairies * Motivation for a few more files * A few more DAO classes * Last interface --- app/Models/CategoryDAO.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/Models/CategoryDAO.php') diff --git a/app/Models/CategoryDAO.php b/app/Models/CategoryDAO.php index 02845ebe7..dd97bd6cc 100644 --- a/app/Models/CategoryDAO.php +++ b/app/Models/CategoryDAO.php @@ -75,7 +75,8 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo { return false; } - protected function autoUpdateDb(array $errorInfo) { + /** @param array $errorInfo */ + protected function autoUpdateDb(array $errorInfo): bool { if (isset($errorInfo[0])) { if ($errorInfo[0] === FreshRSS_DatabaseDAO::ER_BAD_FIELD_ERROR || $errorInfo[0] === FreshRSS_DatabaseDAOPGSQL::UNDEFINED_COLUMN) { $errorLines = explode("\n", $errorInfo[2], 2); // The relevant column name is on the first line, other lines are noise -- cgit v1.2.3