You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that PHP supports typehinting and return types the @param, @return and also @throws documentations are obsolete. Explaining these would be outside the scope of that chapter, but personally I would not advice to still use them. Perhaps limit the chapter to just the example of @author and @link with a link to phpDocumentor.
What are your thoughts?
The text was updated successfully, but these errors were encountered:
I do not agree, especially with @param because you can provide a description which can be helpful in cases where the type hint alone does not provide enough information about the expected parameter value.
In my experience the combination of typehint + variable name is almost always enough. If not, I could see the added value of @param with a description. Conclusion could be to change the chapter explaining that. But as the chapter stands now It feels a little outdated to me.
To get (more) meaningful results out of phpDocumentor, ApiGen, and the like (which is what the chapter is about), the @ tags are useful or even necessary. But you could clarify that purely for code commenting without using those tools, type hinting could suffice.
Now that PHP supports typehinting and return types the @param, @return and also @throws documentations are obsolete. Explaining these would be outside the scope of that chapter, but personally I would not advice to still use them. Perhaps limit the chapter to just the example of @author and @link with a link to phpDocumentor.
What are your thoughts?
The text was updated successfully, but these errors were encountered: