Skip to content

Commit

Permalink
Merge pull request #324 from wp-cli/fix/wpcs-3.0-issues
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy authored Aug 30, 2023
2 parents 594f0b4 + a638015 commit 4125a31
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"require-dev": {
"wp-cli/extension-command": "^1.2 || ^2",
"wp-cli/wp-cli-tests": "^3.1"
"wp-cli/wp-cli-tests": "^4"
},
"config": {
"process-timeout": 7200,
Expand Down
2 changes: 1 addition & 1 deletion scaffold-command.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
return;
}

$wpcli_scaffold_autoloader = dirname( __FILE__ ) . '/vendor/autoload.php';
$wpcli_scaffold_autoloader = __DIR__ . '/vendor/autoload.php';
if ( file_exists( $wpcli_scaffold_autoloader ) ) {
require_once $wpcli_scaffold_autoloader;
}
Expand Down
4 changes: 1 addition & 3 deletions src/Scaffold_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,6 @@ protected function maybe_create_themes_dir() {
if ( ! is_dir( $themes_dir ) ) {
wp_mkdir_p( $themes_dir );
}

}

/**
Expand All @@ -1096,7 +1095,6 @@ protected function maybe_create_plugins_dir() {
if ( ! is_dir( WP_PLUGIN_DIR ) ) {
wp_mkdir_p( WP_PLUGIN_DIR );
}

}

/**
Expand All @@ -1113,7 +1111,7 @@ protected function init_wp_filesystem() {
* Localizes the template path.
*/
private static function mustache_render( $template, $data = [] ) {
return Utils\mustache_render( dirname( dirname( __FILE__ ) ) . "/templates/{$template}", $data );
return Utils\mustache_render( dirname( __DIR__ ) . "/templates/{$template}", $data );
}

/**
Expand Down

0 comments on commit 4125a31

Please sign in to comment.