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/EntryDAOPGSQL.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/EntryDAOPGSQL.php')
| -rw-r--r-- | app/Models/EntryDAOPGSQL.php | 12 |
1 files changed, 6 insertions, 6 deletions
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; } |
