Skip to content

Commit 0838f61

Browse files
committed
Lint fix
1 parent 3aa9567 commit 0838f61

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎src/Scaffold_Command.php‎

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

33
use WP_CLI\Utils;
4+
use WP_CLI\Path;
45
use WP_CLI\Inflector;
56

67
/**
@@ -863,7 +864,7 @@ private function scaffold_plugin_theme_tests( $args, $assoc_args, $type ) {
863864
WP_CLI::error( "Invalid {$type} directory specified. No such directory '{$target_dir}'." );
864865
}
865866
if ( empty( $slug ) ) {
866-
$slug = Utils\basename( $target_dir );
867+
$slug = Path::basename( $target_dir );
867868
// Validate derived slug as well.
868869
if ( in_array( $slug, [ '.', '..' ], true ) ) {
869870
WP_CLI::error( "Invalid {$type} slug specified. The slug cannot be '.' or '..'." );
@@ -1168,7 +1169,7 @@ private static function mustache_render( $template, $data = [] ) {
11681169
* Gets the template path based on installation type.
11691170
*/
11701171
private static function get_template_path( $template ) {
1171-
$command_root = Utils\phar_safe_path( dirname( __DIR__ ) );
1172+
$command_root = Path::phar_safe( dirname( __DIR__ ) );
11721173
$template_path = "{$command_root}/templates/{$template}";
11731174

11741175
if ( ! file_exists( $template_path ) ) {

0 commit comments

Comments
 (0)