From 0684c39793cfcdc21fc1a5061ec81dd8c07099fc Mon Sep 17 00:00:00 2001 From: Igor Zinovyev Date: Tue, 11 Jun 2024 14:30:03 +0300 Subject: [PATCH] Fixed Phan issues. --- projects/plugins/wpcomsh/imports/utils/class-fileextractor.php | 2 +- projects/plugins/wpcomsh/safeguard/utils.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/plugins/wpcomsh/imports/utils/class-fileextractor.php b/projects/plugins/wpcomsh/imports/utils/class-fileextractor.php index d2ea9871463e0..268dada68b786 100644 --- a/projects/plugins/wpcomsh/imports/utils/class-fileextractor.php +++ b/projects/plugins/wpcomsh/imports/utils/class-fileextractor.php @@ -60,7 +60,7 @@ private static function extract_zip( string $file, string $destination ) { $extracted = $zip->extractTo( $destination ); $zip->close(); - if ( $extracted !== true ) { + if ( ! $extracted ) { return new WP_Error( 'zipfile_extract_failure', __( 'The ZIP file could not be extracted.', 'wpcomsh' ) ); } return true; diff --git a/projects/plugins/wpcomsh/safeguard/utils.php b/projects/plugins/wpcomsh/safeguard/utils.php index aa0924ef60cce..b2d0e77f99443 100644 --- a/projects/plugins/wpcomsh/safeguard/utils.php +++ b/projects/plugins/wpcomsh/safeguard/utils.php @@ -138,7 +138,7 @@ function uncompress_package( $package ) { } $was_uncompressed = $zip_handler->extractTo( $tmp_package_folder ); - if ( $was_uncompressed !== true ) { + if ( ! $was_uncompressed ) { return new WP_Error( 'process_failed', 'The zip file could not be decompressed.' ); }