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 --- lib/lib_rss.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'lib/lib_rss.php') diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 5b335e8d8..b608743f3 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -193,11 +193,7 @@ function timestamptodate ($t, $hour = true) { return @date ($date, $t); } -/** - * @param string $text - * @return string - */ -function html_only_entity_decode($text) { +function html_only_entity_decode(string $text): string { static $htmlEntitiesOnly = null; if ($htmlEntitiesOnly === null) { $htmlEntitiesOnly = array_flip(array_diff( @@ -210,9 +206,8 @@ function html_only_entity_decode($text) { /** * @param array $attributes - * @return SimplePie */ -function customSimplePie($attributes = array()) { +function customSimplePie($attributes = array()): SimplePie { $limits = FreshRSS_Context::$system_conf->limits; $simplePie = new SimplePie(); $simplePie->set_useragent(FRESHRSS_USERAGENT); -- cgit v1.2.3