Skip to content

[Intl] Change number PHPDoc type to int|float #23987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 26, 2017

Conversation

PurpleBooth
Copy link
Contributor

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

@PurpleBooth PurpleBooth changed the title Change number PHPDoc type to integer Change number PHPDoc type to integer|float Aug 25, 2017
@PurpleBooth PurpleBooth changed the title Change number PHPDoc type to integer|float Change number PHPDoc type to int|float Aug 25, 2017
@PurpleBooth PurpleBooth changed the title Change number PHPDoc type to int|float [Intl] Change number PHPDoc type to int|float Aug 25, 2017
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
@sstok
Copy link
Contributor

sstok commented Aug 26, 2017

Status: reviewed

@fabpot
Copy link
Member

fabpot commented Aug 26, 2017

Good catch, thanks @PurpleBooth.

@fabpot fabpot merged commit c7601cb into symfony:2.7 Aug 26, 2017
fabpot added a commit that referenced this pull request Aug 26, 2017
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants