Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Conversation

@ahmadawais
Copy link
Contributor

In accordance with WP PHP documentation standards Add Periods to end comments, @params and @returns

Copy link
Member

Choose a reason for hiding this comment

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

I haven't ever seen periods at the end of the type, only when there's a comment too. Can you clarify where else in core follows this pattern?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey, @danielbachhuber !

Periods at the end of the type are the part of standard WordPress PHP documentation in the Core handbook. You can check this information here https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/#1-functions-class-methods

Copy link
Member

Choose a reason for hiding this comment

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

I read:

@return: Should contain all possible return types, and a description for each. Use a period at the end. Note: @return void should not be used outside of the default bundled themes.

This @return doc doesn't have a description, so I don't think it needs a period.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@danielbachhuber Though it does mention Use a period at the end.
What do you think about that? Let me know. I'll follow your lead.

Copy link
Member

Choose a reason for hiding this comment

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

Only add a period if there's actually a description, please. Better yet, add descriptions where they're missing, and then you can add a period to that :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@danielbachhuber Got it, re-submitting the corrected version.

@ahmadawais
Copy link
Contributor Author

@danielbachhuber Kindly, take a look.

@danielbachhuber
Copy link
Member

🚢 🚢 🚢

danielbachhuber added a commit that referenced this pull request Oct 28, 2015
@danielbachhuber danielbachhuber merged commit 436bfc4 into WP-API:develop Oct 28, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants