Skip to content

Commit b1015dd

Browse files
committed
Lint fix
1 parent 42d80d2 commit b1015dd

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/Package_Command.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use WP_CLI\Package\ComposerIO;
1818
use WP_CLI\Extractor;
1919
use WP_CLI\Utils;
20+
use WP_CLI\Path;
2021
use WP_CLI\JsonManipulator;
2122
use WP_CLI\PackageManagerEventSubscriber;
2223
use WP_CLI\RequestsLibrary;
@@ -308,7 +309,7 @@ public function install( $args, $assoc_args ) {
308309
}
309310
} elseif ( is_dir( $package_name ) && file_exists( $package_name . '/composer.json' ) ) {
310311
$dir_package = $package_name;
311-
if ( ! Utils\is_path_absolute( $dir_package ) ) {
312+
if ( ! Path::is_absolute( $dir_package ) ) {
312313
$dir_package = getcwd() . DIRECTORY_SEPARATOR . $dir_package;
313314
}
314315
list( $package_name, $version ) = self::get_package_name_and_version_from_dir_package( $dir_package );
@@ -1192,9 +1193,9 @@ private function get_composer_json_path() {
11921193
if ( null === $composer_path || getenv( 'WP_CLI_TEST_PACKAGE_GET_COMPOSER_JSON_PATH' ) ) {
11931194

11941195
if ( getenv( 'WP_CLI_PACKAGES_DIR' ) ) {
1195-
$composer_path = Utils\trailingslashit( getenv( 'WP_CLI_PACKAGES_DIR' ) ) . 'composer.json';
1196+
$composer_path = Path::trailingslashit( getenv( 'WP_CLI_PACKAGES_DIR' ) ) . 'composer.json';
11961197
} else {
1197-
$composer_path = Utils\trailingslashit( Utils\get_home_dir() ) . '.wp-cli/packages/composer.json';
1198+
$composer_path = Path::trailingslashit( Path::get_home_dir() ) . '.wp-cli/packages/composer.json';
11981199
}
11991200

12001201
// `composer.json` and its directory might need to be created
@@ -1243,7 +1244,7 @@ private function create_default_composer_json( $composer_path ) {
12431244
WP_CLI::error( sprintf( "Composer directory '%s' for packages not found: %s", $composer_dir, $error['message'] ) );
12441245
}
12451246

1246-
$composer_path = Utils\trailingslashit( $composer_dir ) . Utils\basename( $composer_path );
1247+
$composer_path = Path::trailingslashit( $composer_dir ) . Path::basename( $composer_path );
12471248

12481249
$json_file = new JsonFile( $composer_path );
12491250

@@ -1643,7 +1644,7 @@ private function set_composer_auth_env_var() {
16431644
* See https://github.com/composer/ca-bundle/blob/1.1.0/src/CaBundle.php#L64
16441645
*/
16451646
private function avoid_composer_ca_bundle() {
1646-
if ( Utils\inside_phar() && ! getenv( 'SSL_CERT_FILE' ) && ! getenv( 'SSL_CERT_DIR' ) && ! ini_get( 'openssl.cafile' ) && ! ini_get( 'openssl.capath' ) ) {
1647+
if ( Path::inside_phar() && ! getenv( 'SSL_CERT_FILE' ) && ! getenv( 'SSL_CERT_DIR' ) && ! ini_get( 'openssl.cafile' ) && ! ini_get( 'openssl.capath' ) ) {
16471648
$certificate_path = Utils\extract_from_phar( RequestsLibrary::get_bundled_certificate_path() );
16481649
putenv( "SSL_CERT_FILE={$certificate_path}" );
16491650
}

0 commit comments

Comments
 (0)