From 2bea3729735f65d5c0f5810e90e9805fbf6f1134 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Sun, 14 Jan 2024 22:18:48 +0100 Subject: [PATCH] Use phpstan-specific comments for main sanitization + validation functions --- src/MD_STD_IN.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MD_STD_IN.php b/src/MD_STD_IN.php index 16b08b5..a5bff94 100644 --- a/src/MD_STD_IN.php +++ b/src/MD_STD_IN.php @@ -14,7 +14,7 @@ final class MD_STD_IN { * * @param mixed $input Input string. * - * @return integer + * @return positive-int */ public static function sanitize_id(mixed $input):int { @@ -39,7 +39,7 @@ final class MD_STD_IN { * * @param mixed $input Input string. * - * @return integer + * @return 0|positive-int */ public static function sanitize_id_or_zero(mixed $input):int { @@ -92,7 +92,7 @@ final class MD_STD_IN { * * @param mixed $input Input string. * - * @return string + * @return non-empty-string */ public static function sanitize_rgb_color(mixed $input):string { @@ -117,7 +117,7 @@ final class MD_STD_IN { * * @param array $inputs Input array. * - * @return list + * @return list */ public static function sanitize_id_array(array $inputs):array {