Skip to content

Commit 459e6cb

Browse files
committed
minor #23987 [Intl] Change number PHPDoc type to int|float (PurpleBooth)
This PR was merged into the 2.7 branch. Discussion ---------- [Intl] 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 | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- c7601cb Change number PHPDoc type to int|float
2 parents 3ba4112 + c7601cb commit 459e6cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

+3-3
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)