Skip to content

Commit 7b23ef9

Browse files
committed
Adapt namespace
1 parent bec20a5 commit 7b23ef9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

templates/hello-world-command.mustache

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?php
22

3-
if ( ! class_exists( 'WP_CLI' ) ) {
3+
namespace WP_CLI\HelloWorld;
4+
5+
use WP_CLI;
6+
7+
if ( ! class_exists( '\WP_CLI' ) ) {
48
return;
59
}
610

@@ -25,4 +29,4 @@ if ( file_exists( $wpcli_hello_world_autoloader ) ) {
2529
require_once $wpcli_hello_world_autoloader;
2630
}
2731

28-
WP_CLI::add_command( 'hello-world', '\WP_CLI\HelloWorld\HelloWorldCommand' );
32+
WP_CLI::add_command( 'hello-world', HelloWorldCommand::class );

0 commit comments

Comments
 (0)