From 133a3dd1a3dc42733823287fc1606382c541a614 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 12 Nov 2021 23:50:07 +0000 Subject: [PATCH] Coding Standards: Rename the `$gzData` argument to `$gz_data` in `WP_Http_Encoding::compatible_gzinflate()`. This fixes a `Variable "$gzData" is not in valid snake_case format` WPCS warning. Follow-up to [11684]. See #53359. git-svn-id: https://develop.svn.wordpress.org/trunk@52150 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-http-encoding.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/wp-includes/class-wp-http-encoding.php b/src/wp-includes/class-wp-http-encoding.php index 33314826f7..62ae420a9b 100644 --- a/src/wp-includes/class-wp-http-encoding.php +++ b/src/wp-includes/class-wp-http-encoding.php @@ -97,38 +97,38 @@ class WP_Http_Encoding { * @link https://www.php.net/manual/en/function.gzinflate.php#70875 * @link https://www.php.net/manual/en/function.gzinflate.php#77336 * - * @param string $gzData String to decompress. + * @param string $gz_data String to decompress. * @return string|false Decompressed string on success, false on failure. */ - public static function compatible_gzinflate( $gzData ) { + public static function compatible_gzinflate( $gz_data ) { // Compressed data might contain a full header, if so strip it for gzinflate(). - if ( "\x1f\x8b\x08" === substr( $gzData, 0, 3 ) ) { + if ( "\x1f\x8b\x08" === substr( $gz_data, 0, 3 ) ) { $i = 10; - $flg = ord( substr( $gzData, 3, 1 ) ); + $flg = ord( substr( $gz_data, 3, 1 ) ); if ( $flg > 0 ) { if ( $flg & 4 ) { - list($xlen) = unpack( 'v', substr( $gzData, $i, 2 ) ); + list($xlen) = unpack( 'v', substr( $gz_data, $i, 2 ) ); $i = $i + 2 + $xlen; } if ( $flg & 8 ) { - $i = strpos( $gzData, "\0", $i ) + 1; + $i = strpos( $gz_data, "\0", $i ) + 1; } if ( $flg & 16 ) { - $i = strpos( $gzData, "\0", $i ) + 1; + $i = strpos( $gz_data, "\0", $i ) + 1; } if ( $flg & 2 ) { $i = $i + 2; } } - $decompressed = @gzinflate( substr( $gzData, $i, -8 ) ); + $decompressed = @gzinflate( substr( $gz_data, $i, -8 ) ); if ( false !== $decompressed ) { return $decompressed; } } // Compressed data from java.util.zip.Deflater amongst others. - $decompressed = @gzinflate( substr( $gzData, 2 ) ); + $decompressed = @gzinflate( substr( $gz_data, 2 ) ); if ( false !== $decompressed ) { return $decompressed; }