From b3121709d62d9fadf890e523b9c9dba7cf702d25 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 14 Apr 2023 14:23:45 +0200 Subject: PHPStan Level 6 FreshRSS_Search FreshRSS_Entry (#5292) * PHPStan Level 6 FreshRSS_Search FreshRSS_Entry * Minor fix * Type fix * Apply suggestions from code review Co-authored-by: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> * Minor types syntax Compatibility Intelephense --------- Co-authored-by: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> --- lib/Minz/Helper.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/Minz/Helper.php') diff --git a/lib/Minz/Helper.php b/lib/Minz/Helper.php index 92e97ad6c..8ecc1af8d 100644 --- a/lib/Minz/Helper.php +++ b/lib/Minz/Helper.php @@ -12,8 +12,13 @@ class Minz_Helper { /** * Wrapper for htmlspecialchars. * Force UTf-8 value and can be used on array too. + * + * @phpstan-template T of string|array + * @phpstan-param T $var + * @phpstan-return T + * * @param string|array $var - * @return ($var is array ? array : string) + * @return string|array */ public static function htmlspecialchars_utf8($var) { if (is_array($var)) { -- cgit v1.2.3