-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] Fix PHPDoc #53914
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
[Messenger] Fix PHPDoc #53914
Conversation
* @return StampInterface[]|StampInterface[][] The stamps for the specified FQCN, or all stamps by their class name | ||
* | ||
* @psalm-return ($stampFqcn is string : array<class-string<StampInterface>, list<StampInterface>> ? list<TStamp>) | ||
* @return ($stampFqcn is string ? list<TStamp> : array<class-string<StampInterface>, list<StampInterface>>) The stamps for the specified FQCN, or all stamps by their class name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why merge return and psalm-return? I think we didn't anywhere yet so we shouldn't start in a PR like that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i thought it made psalm trip, but no, it still errors. We should template stamps property still, but that's not a public API concern. Also i was unsure how to do it 😅
in fact we use both conditional @return
and @psalm-return
. Merge across the board welcome i think.
https://github.com/search?q=repo%3Asymfony%2Fsymfony+%22%40return+%28%22&type=code
https://github.com/search?q=repo%3Asymfony%2Fsymfony+%22%40psalm-return+%28%22&type=code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we use conditional types in @return
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont mind, you can cherry pick a2c660b
https://psalm.dev/docs/annotating_code/type_syntax/conditional_types/
https://psalm.dev/r/76330fe331