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/EntryDAOPGSQL.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'app/Models/EntryDAOPGSQL.php') diff --git a/app/Models/EntryDAOPGSQL.php b/app/Models/EntryDAOPGSQL.php index a9304bbaa..7a46670fc 100644 --- a/app/Models/EntryDAOPGSQL.php +++ b/app/Models/EntryDAOPGSQL.php @@ -2,23 +2,23 @@ class FreshRSS_EntryDAOPGSQL extends FreshRSS_EntryDAOSQLite { - public function hasNativeHex() { + public function hasNativeHex(): bool { return true; } - public function sqlHexDecode($x) { + public function sqlHexDecode(string $x): string { return 'decode(' . $x . ", 'hex')"; } - public function sqlHexEncode($x) { + public function sqlHexEncode(string $x): string { return 'encode(' . $x . ", 'hex')"; } - public function sqlIgnoreConflict($sql) { + public function sqlIgnoreConflict(string $sql): string { return rtrim($sql, ' ;') . ' ON CONFLICT DO NOTHING'; } - protected function autoUpdateDb($errorInfo) { + protected function autoUpdateDb(array $errorInfo) { if (isset($errorInfo[0])) { if ($errorInfo[0] === FreshRSS_DatabaseDAOPGSQL::UNDEFINED_TABLE) { if (stripos($errorInfo[2], 'tag') !== false) { @@ -32,7 +32,7 @@ class FreshRSS_EntryDAOPGSQL extends FreshRSS_EntryDAOSQLite { return false; } - protected function addColumn($name) { + protected function addColumn(string $name) { return false; } -- cgit v1.2.3