Docs: Fix return_value() inline documentation#205
Conversation
I don't think they can be booleans.. Can you double check that? In any case, let's try to make the types as precise as possible. |
The WP_CLI:error() here uses exit() so it indeed never, but it's returning |
There was a problem hiding this comment.
Pull request overview
This PR corrects inline documentation for the return_value() method in the Config_Command class. The changes fix a duplicate parameter name and update the type annotations.
Changes:
- Fixed duplicate
@paramentry for$type- replaced with correct$valuesparameter - Updated
@paramtype annotation for$valuesto reflect its array structure - Updated
@returnannotation to describe the return type
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Corrected 2 inline docs for return_value():
$valuesnot a redundant$type.$value['name']&$value['type'].@returnismixedsince we are either returnWP_CLI::error(), which technicallynullas per https://make.wordpress.org/cli/handbook/references/internal-api/wp-cli-error/, and$result[0]['value']which is either boolean or string from WP config variables