From 1c5cf718599f698836fef3f8f88748757a7e85b5 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 6 Feb 2022 14:31:36 +0100 Subject: Fix Fever 32 bit ID issue + more PHP type hints (#4201) * Fix Fever 32 bit ID issue + more PHP type hints #fix https://github.com/FreshRSS/FreshRSS/issues/4200 Follow up and fix regression from https://github.com/FreshRSS/FreshRSS/pull/4110 * More PHP type hints with PHPStan * Fix pull problem * Avoid more nulls --- app/Models/EntryDAOSQLite.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'app/Models/EntryDAOSQLite.php') diff --git a/app/Models/EntryDAOSQLite.php b/app/Models/EntryDAOSQLite.php index 51bf9635f..72debd176 100644 --- a/app/Models/EntryDAOSQLite.php +++ b/app/Models/EntryDAOSQLite.php @@ -2,23 +2,23 @@ class FreshRSS_EntryDAOSQLite extends FreshRSS_EntryDAO { - public function isCompressed() { + public function isCompressed(): bool { return false; } - public function hasNativeHex() { + public function hasNativeHex(): bool { return false; } - public function sqlHexDecode($x) { + public function sqlHexDecode(string $x): string { return $x; } - public function sqlIgnoreConflict($sql) { + public function sqlIgnoreConflict(string $sql): string { return str_replace('INSERT INTO ', 'INSERT OR IGNORE INTO ', $sql); } - protected function autoUpdateDb($errorInfo) { + protected function autoUpdateDb(array $errorInfo) { if ($tableInfo = $this->pdo->query("SELECT sql FROM sqlite_master where name='tag'")) { $showCreate = $tableInfo->fetchColumn(); if (stripos($showCreate, 'tag') === false) { @@ -243,10 +243,10 @@ DROP TABLE IF EXISTS `tmp`; /** * Mark all the articles in a tag as read. * @param integer $id tag ID, or empty for targeting any tag - * @param integer $idMax max article ID + * @param string $idMax max article ID * @return integer|false affected rows */ - public function markReadTag($id = 0, $idMax = 0, $filters = null, $state = 0, $is_read = true) { + public function markReadTag($id = 0, string $idMax = '0', $filters = null, int $state = 0, bool $is_read = true) { FreshRSS_UserDAO::touch(); if ($idMax == 0) { $idMax = time() . '000000'; -- cgit v1.2.3