Change number PHPDoc type to int|float

While number is a valid type inside PHP internally, it's not a part of
the PHPDoc standard. This causes IDEs and static analysers to raise
errors on this function. The internal PHP type `number` is the same as
`int|float`, this changes the type to that.

https://php.net/manual/en/language.pseudo-types.php#language.types.number
https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc.md#keyword
This commit is contained in:
Billie Thompson 2017-08-25 17:06:14 +01:00 committed by Billie Thompson
parent 3ba4112009
commit c7601cb40e
No known key found for this signature in database
GPG Key ID: D5D50C9378BFCAB0
1 changed files with 3 additions and 3 deletions

View File

@ -355,9 +355,9 @@ class NumberFormatter
/**
* Format a number.
*
* @param number $value The value to format
* @param int $type Type of the formatting, one of the format type constants
* Only type NumberFormatter::TYPE_DEFAULT is currently supported.
* @param int|float $value The value to format
* @param int $type Type of the formatting, one of the format type constants
* Only type NumberFormatter::TYPE_DEFAULT is currently supported.
*
* @return bool|string The formatted value or false on error
*