Skip to content

Commit 9ed816c

Browse files
committed
Implement review suggestions
1 parent e8a2d24 commit 9ed816c

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎src/Block_Type_Command.php‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,14 +276,15 @@ public function get( $args, $assoc_args ) {
276276
*
277277
* @subcommand exists
278278
*
279-
* @param array $args Positional arguments.
279+
* @param array $args Positional arguments.
280+
* @param array $assoc_args Associative arguments.
280281
*/
281-
public function exists( $args ) {
282-
$registry = WP_Block_Type_Registry::get_instance();
283-
$block_type = $registry->is_registered( $args[0] );
282+
public function exists_( $args, $assoc_args ) {
283+
$registry = WP_Block_Type_Registry::get_instance();
284+
$name = $args[0];
284285

285-
if ( $block_type ) {
286-
WP_CLI::success( "Block type '{$args[0]}' is registered." );
286+
if ( $registry->is_registered( $name ) ) {
287+
WP_CLI::success( "Block type '{$name}' is registered." );
287288
} else {
288289
WP_CLI::halt( 1 );
289290
}

0 commit comments

Comments
 (0)