Proposal: Removing Redundant DocBlocks Where Type Hints Exist #56925
Unanswered
Rottmayer89
asked this question in
Ideas
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone
While reviewing the Laravel codebase, I noticed that in several places we have both a type hint and a corresponding DocBlock annotation (for example, a : void return type along with @return void in the DocBlock).
According to the Laravel contribution guidelines, if a type-hint is provided, the DocBlock is unnecessary.
Proposal
Gradually improve code consistency by removing redundant DocBlocks where the information is already provided by type hints.
Approach
The changes would be introduced incrementally across different parts of the codebase.
Instead of a single large PR, I would submit multiple small and focused PRs, each targeting a limited set of files, so they remain easy to review.
Question
Would the core team be open to this kind of incremental cleanup?
If so, I’d be happy to start submitting PRs in small batches.
Thanks for your time and consideration 🙏
Beta Was this translation helpful? Give feedback.
All reactions