Skip to content

Commit a8053d6

Browse files
committed
Merge branch 'add/phpstan' of https://github.com/wp-cli/extension-command into add/phpstan
2 parents 1536570 + f7d3b4c commit a8053d6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Plugin_Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,7 @@ public function uninstall( $args, $assoc_args = array() ) {
12761276
/**
12771277
* @var callable $callback
12781278
*/
1279-
$callback = array( $wp_filesystem, 'delete' );
1279+
$callback = [ $wp_filesystem, 'delete' ];
12801280
array_map( $callback, $json_translation_files );
12811281
}
12821282
}

src/WP_CLI/CommandWithUpgrade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,15 @@ public function install( $args, $assoc_args ) {
203203

204204
$filter = false;
205205
// If a GitHub URL, do some guessing as to the correct plugin/theme directory.
206-
if ( $is_remote && 'github.com' === \WP_CLI\Utils\parse_url( $slug, PHP_URL_HOST )
206+
if ( $is_remote && 'github.com' === Utils\parse_url( $slug, PHP_URL_HOST )
207207
// Don't attempt to rename ZIPs uploaded to the releases page or coming from a raw source.
208208
&& ! preg_match( '#github\.com/[^/]+/[^/]+/(?:releases/download|raw)/#', $slug ) ) {
209209

210210
$filter = function ( $source ) use ( $slug ) {
211211
/**
212212
* @var string $path
213213
*/
214-
$path = \WP_CLI\Utils\parse_url( $slug, PHP_URL_PATH );
214+
$path = Utils\parse_url( $slug, PHP_URL_PATH );
215215
$slug_dir = Utils\basename( $path, '.zip' );
216216

217217
// Don't use the zip name if archive attached to release, as name likely to contain version tag/branch.

0 commit comments

Comments
 (0)