Update Formatter.php

string type are cast to integer and have rapresentation of 2147483647 using float type instead for represent larger numbers
This commit is contained in:
Marco Germani
2015-10-27 15:48:13 +01:00
parent d40435e931
commit 53593c8ec3

View File

@@ -1092,7 +1092,7 @@ class Formatter extends Component
* If [[sizeFormatBase]] is 1024, [binary prefixes](http://en.wikipedia.org/wiki/Binary_prefix) (e.g. kibibyte/KiB, mebibyte/MiB, ...)
* are used in the formatting result.
*
* @param integer $value value in bytes to be formatted.
* @param string|integer|float $value value in bytes to be formatted.
* @param integer $decimals the number of digits after the decimal point.
* @param array $options optional configuration for the number formatter. This parameter will be merged with [[numberFormatterOptions]].
* @param array $textOptions optional configuration for the number formatter. This parameter will be merged with [[numberFormatterTextOptions]].
@@ -1136,7 +1136,7 @@ class Formatter extends Component
* If [[sizeFormatBase]] is 1024, [binary prefixes](http://en.wikipedia.org/wiki/Binary_prefix) (e.g. kibibyte/KiB, mebibyte/MiB, ...)
* are used in the formatting result.
*
* @param integer $value value in bytes to be formatted.
* @param string|integer|float $value value in bytes to be formatted.
* @param integer $decimals the number of digits after the decimal point.
* @param array $options optional configuration for the number formatter. This parameter will be merged with [[numberFormatterOptions]].
* @param array $textOptions optional configuration for the number formatter. This parameter will be merged with [[numberFormatterTextOptions]].