Skip to content
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

Add "@return" PHPDoc type to Collection property "getter" by *ToMany annotation and attribute #312

Conversation

jszutkowski
Copy link
Contributor

@jszutkowski jszutkowski commented May 12, 2024

As in the title - I added two classes that based on the property's OneToMany or ManyToMany annotation add @return doc type to a getter method.
It adds the doc type only if method returns single property.
It also fixes invalid docblocks like @return Collection<Entity> -> @return Collection<int, Entity>.

Any feedback appreciated

@jszutkowski jszutkowski marked this pull request as ready for review May 12, 2024 16:34
@jszutkowski jszutkowski changed the title Add @return PHPDoc type to Collection property getter by *ToMany annotation or attribute Add "@return" PHPDoc type to Collection property "getter" by *ToMany annotation and attribute May 28, 2024
Copy link
Member

@samsonasik samsonasik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you extract to multiple PRs? Single PR for single rule. Thank you.

@jszutkowski
Copy link
Contributor Author

@samsonasik done, the first PR #317

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

Successfully merging this pull request may close these issues.

None yet

2 participants