Skip to content

[Serializer] @method getSupportedTypes return type wrong place #52477

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

Closed
darthf1 opened this issue Nov 7, 2023 · 1 comment
Closed

[Serializer] @method getSupportedTypes return type wrong place #52477

darthf1 opened this issue Nov 7, 2023 · 1 comment

Comments

@darthf1
Copy link

darthf1 commented Nov 7, 2023

Symfony version(s) affected

6.3.0 and later

Description

* @method getSupportedTypes(?string $format): array

* @method getSupportedTypes(?string $format): array

On both these lines, the phpdoc return type is behind the method name, whilst it should be in front.

How to reproduce

https://phpstan.org/r/af3fd1c7-38d4-4a3c-9f73-008c4e9d2f07

vs

https://phpstan.org/r/d131e2fa-55e3-4d72-b14f-81f84c399d86

Possible Solution

Change

* @method getSupportedTypes(?string $format): array 

to

* @method array getSupportedTypes(?string $format)

Additional Context

No response

@nicolas-grekas
Copy link
Member

Can you please send a PR to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants