Skip to content

Commit c7601cb

Browse files
committed
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
1 parent 3ba4112 commit c7601cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,9 @@ public function formatCurrency($value, $currency)
355355
/**
356356
* Format a number.
357357
*
358-
* @param number $value The value to format
359-
* @param int $type Type of the formatting, one of the format type constants
360-
* Only type NumberFormatter::TYPE_DEFAULT is currently supported.
358+
* @param int|float $value The value to format
359+
* @param int $type Type of the formatting, one of the format type constants
360+
* Only type NumberFormatter::TYPE_DEFAULT is currently supported.
361361
*
362362
* @return bool|string The formatted value or false on error
363363
*

0 commit comments

Comments
 (0)