From 5a8612a1cd8b26240bf7bde507af84b92df2f00e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=8Ceslav=20Przywara?= Date: Fri, 18 Aug 2023 13:48:45 +0200 Subject: [PATCH] Update type hint of $callable parameter in add_command() method The $callable can be a class name or an object as well, so allow `object` and `string` types in the type hint. --- php/class-wp-cli.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/class-wp-cli.php b/php/class-wp-cli.php index f74f7f0ad6..8ca2263c6e 100644 --- a/php/class-wp-cli.php +++ b/php/class-wp-cli.php @@ -463,7 +463,7 @@ private static function wp_hook_build_unique_id( $tag, $function, $priority ) { * @category Registration * * @param string $name Name for the command (e.g. "post list" or "site empty"). - * @param callable $callable Command implementation as a class, function or closure. + * @param callable|object|string $callable Command implementation as a class, function or closure. * @param array $args { * Optional. An associative array with additional registration parameters. *