diff --git a/classes/Optimization/File.php b/classes/Optimization/File.php index 13ad7b590..57820f168 100644 --- a/classes/Optimization/File.php +++ b/classes/Optimization/File.php @@ -530,7 +530,7 @@ public function optimize( $args = [] ) { return new \WP_Error( 'temp_file_not_found', $temp_file->get_error_message() ); } - if(property_exists($response, 'message' )) { + if ( property_exists( $response, 'message' ) ) { $args['convert'] = ''; } diff --git a/classes/Optimization/Process/AbstractProcess.php b/classes/Optimization/Process/AbstractProcess.php index 72c2fb1cb..ea19d2117 100644 --- a/classes/Optimization/Process/AbstractProcess.php +++ b/classes/Optimization/Process/AbstractProcess.php @@ -657,10 +657,9 @@ public function optimize_size( $size, $optimization_level = null ) { 'optimization_level' => $optimization_level, ] ); - if(property_exists( $response, 'message' )) { + if ( property_exists( $response, 'message' ) ) { $path_is_temp = false; } - } } } @@ -736,7 +735,7 @@ protected function compare_webp_file_size( $args ) { } // Optimization succeeded. - if (! property_exists( $args['response'], 'message' ) && $args['is_webp'] ) { + if ( ! property_exists( $args['response'], 'message' ) && $args['is_webp'] ) { /** * We just created a WebP version: * Check if it is lighter than the (maybe optimized) non-WebP file. @@ -1793,7 +1792,7 @@ public function update_size_optimization_data( $response, $size, $level ) { */ $data = (array) apply_filters( "imagify{$_unauthorized}_file_optimization_data", $data, $response, $size, $level, $this->get_data() ); - $size = str_replace('@imagify-webp', '', $size); + $size = str_replace( '@imagify-webp', '', $size ); // Store. $this->get_data()->update_size_optimization_data( $size, $data );