Skip to content

Commit a8548f3

Browse files
committed
Use PHPDoc instead
1 parent 59128c9 commit a8548f3

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/Comment_Command.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,11 @@ public function __construct() {
6363
* # Create comment.
6464
* $ wp comment create --comment_post_ID=15 --comment_content="hello blog" --comment_author="wp-cli"
6565
* Success: Created comment 932.
66+
*
67+
* @param string[] $args Positional arguments. Unused.
68+
* @param array<string, mixed> $assoc_args Associative arguments.
6669
*/
67-
public function create( $args, array $assoc_args ) {
70+
public function create( $args, $assoc_args ) {
6871
$assoc_args = wp_slash( $assoc_args );
6972
parent::_create(
7073
$args,
@@ -110,8 +113,11 @@ function ( $params ) {
110113
* # Update comment.
111114
* $ wp comment update 123 --comment_author='That Guy'
112115
* Success: Updated comment 123.
116+
*
117+
* @param string[] $args Positional arguments. Comment IDs to update.
118+
* @param array<string, mixed> $assoc_args Associative arguments.
113119
*/
114-
public function update( $args, array $assoc_args ) {
120+
public function update( $args, $assoc_args ) {
115121
$assoc_args = wp_slash( $assoc_args );
116122
parent::_update(
117123
$args,

src/User_Command.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,11 @@ public function create( $args, $assoc_args ) {
553553
* # Update user
554554
* $ wp user update 123 --display_name=Mary --user_pass=marypass
555555
* Success: Updated user 123.
556+
*
557+
* @param string[] $args Positional arguments. Users to update.
558+
* @param array $assoc_args Associative arguments.
556559
*/
557-
public function update( $args, array $assoc_args ) {
560+
public function update( $args, $assoc_args ) {
558561
if ( isset( $assoc_args['user_login'] ) ) {
559562
WP_CLI::warning( "User logins can't be changed." );
560563
unset( $assoc_args['user_login'] );

0 commit comments

Comments
 (0)