diff options
| author | 2022-02-06 14:31:36 +0100 | |
|---|---|---|
| committer | 2022-02-06 14:31:36 +0100 | |
| commit | 1c5cf718599f698836fef3f8f88748757a7e85b5 (patch) | |
| tree | 2760e8a90bb653cb4000a4f236b1bfec4508e948 /app/Models/EntryDAOSQLite.php | |
| parent | fe880d1a98d8224682036e44520bb92b2ed417aa (diff) | |
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
Diffstat (limited to 'app/Models/EntryDAOSQLite.php')
| -rw-r--r-- | app/Models/EntryDAOSQLite.php | 14 |
1 files changed, 7 insertions, 7 deletions
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'; |
