diff --git a/system/Helpers/number_helper.php b/system/Helpers/number_helper.php index c61229dad345..32dd4e09d68c 100644 --- a/system/Helpers/number_helper.php +++ b/system/Helpers/number_helper.php @@ -173,9 +173,9 @@ function format_number(float $num, int $precision = 1, ?string $locale = null, a /** * Convert a number to a roman numeral. * - * @param string $num it will convert to int + * @param int|string $num it will convert to int */ - function number_to_roman(string $num): ?string + function number_to_roman($num): ?string { static $map = [ 'M' => 1000, diff --git a/user_guide_src/source/helpers/number_helper.rst b/user_guide_src/source/helpers/number_helper.rst index d43967c502f7..0528aa07eee1 100644 --- a/user_guide_src/source/helpers/number_helper.rst +++ b/user_guide_src/source/helpers/number_helper.rst @@ -92,7 +92,7 @@ The following functions are available: .. php:function:: number_to_roman($num) - :param string $num: The number want to convert + :param int|string $num: The number want to convert :returns: The roman number converted from given parameter :rtype: string|null @@ -101,4 +101,4 @@ The following functions are available: .. literalinclude:: number_helper/009.php This function only handles numbers in the range 1 through 3999. - It will return null for any value outside that range. + It will return ``null`` for any value outside that range. diff --git a/user_guide_src/source/helpers/number_helper/009.php b/user_guide_src/source/helpers/number_helper/009.php index 0a520a198943..a55daa265677 100644 --- a/user_guide_src/source/helpers/number_helper/009.php +++ b/user_guide_src/source/helpers/number_helper/009.php @@ -1,5 +1,5 @@