Skip to content

Conversation

PARTHVATALIYA
Copy link
Contributor

Fix: #6033

Add PHPDoc for cmd_starts_with() method in Runner class to improve code readability, align with WordPress coding standards, and help developers understand the purpose and behaviour of the function.

@PARTHVATALIYA PARTHVATALIYA requested a review from a team as a code owner January 24, 2025 05:11
@swissspidy
Copy link
Member

I believe we have a ton of missing docblocks in a lot of other places—would you like to help improve them more holistically? :)

@PARTHVATALIYA
Copy link
Contributor Author

Thank you for pointing that out! I'd be happy to help improve the docblocks more holistically. Let me know if there's a specific area you'd like me to focus on. 😊

@swissspidy
Copy link
Member

Pretty much everything in the php folder, to be honest :)

@PARTHVATALIYA
Copy link
Contributor Author

Actually, many methods are missing docblocks, and I’m not entirely sure about the purpose of each method. How can I write a proper docblock for the methods in the PHP folder without fully understanding the functionality of each one?

@swissspidy
Copy link
Member

Fair enough :) let‘s start with this one then

@swissspidy swissspidy requested a review from mrsdizzie January 27, 2025 09:55
Copy link
Member

@mrsdizzie mrsdizzie left a comment

Choose a reason for hiding this comment

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

Sorry I don't meant to be so Nitpicky on a small PR but this is a particular case where cmd / command happens to refer to the WP-CLI binary, while in most other contexts it actually refers to a specific wp cli command (user, core, db, etc...) so it is better to clarify (even in the next function below "command" starts to refer to specific wp-cli commands again

@mrsdizzie mrsdizzie merged commit 1488fc1 into wp-cli:main Feb 4, 2025
43 of 47 checks passed
@mrsdizzie
Copy link
Member

Thanks!

@swissspidy swissspidy added this to the 2.12.0 milestone Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing PHPDoc for cmd_starts_with() in Runner Class
3 participants