aboutsummaryrefslogtreecommitdiff
path: root/lib/lib_rss.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-01-08 13:26:09 +0100
committerGravatar GitHub <noreply@github.com> 2025-01-08 13:26:09 +0100
commit50adb559823f935582f3ed308b8d4352c5f216ed (patch)
tree74f09efadfcaf28f82505e791e267596f4026053 /lib/lib_rss.php
parentfa701b39f3775ac4250a82fabcec8970b446789b (diff)
Add some missing PHP native types (#7191)
* Add some missing PHP native types Replaces https://github.com/FreshRSS/FreshRSS/pull/7184 * Clean some types
Diffstat (limited to 'lib/lib_rss.php')
-rw-r--r--lib/lib_rss.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index c93243eff..2a5bdd02f 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -217,8 +217,7 @@ function escapeToUnicodeAlternative(string $text, bool $extended = true): string
return trim(str_replace($problem, $replace, $text));
}
-/** @param int|float $n */
-function format_number($n, int $precision = 0): string {
+function format_number(int|float $n, int $precision = 0): string {
// number_format does not seem to be Unicode-compatible
return str_replace(' ', ' ', // Thin non-breaking space
number_format((float)$n, $precision, '.', ' ')
@@ -274,7 +273,7 @@ function html_only_entity_decode(?string $text): string {
* @param array<string,mixed>|string $log
* @return array<string,mixed>|string
*/
-function sensitive_log($log): array|string {
+function sensitive_log(array|string $log): array|string {
if (is_array($log)) {
foreach ($log as $k => $v) {
if (in_array($k, ['api_key', 'Passwd', 'T'], true)) {